From: Bernie Innocenti Date: Mon, 14 Aug 2023 11:48:34 +0000 (-0700) Subject: rm a few files X-Git-Url: https://codewiz.org/gitweb?p=wiki.git;a=commitdiff_plain;h=2397013f067c1e6d6f01fe3d3ab33f9745011d22 rm a few files --- diff --git a/geeki/TODO b/geeki/TODO index 595c51c..261a6f6 100644 --- a/geeki/TODO +++ b/geeki/TODO @@ -10,15 +10,8 @@ * Ditch repo sandbox, use the versioning backend directly * Stage changes by user until committed explicitly (i.e.: wiki changesets) - * Add simple InterWiki support * Find orphaned pages (can be done by combining PageIndex with FindPage) - * Directory listing * Groups/ directory with group lists implemented as wiki pages with unordered lists * Glob for includes: {****{foo/*.c}****} * Variable substitution in includes (aka templates) * Syntax highlighting for code blocks -=== Nice to have === - - * A functionality to have custom merge strategy in git to merge different wiki/GeekiGeeki in a single one - - * See also the original PikiToDo diff --git a/geeki/upgrade b/geeki/upgrade index 8f167d1..8ff2b2a 100644 --- a/geeki/upgrade +++ b/geeki/upgrade @@ -1,7 +1,7 @@ == Update procedure == If you cloned the repository as suggested by the [[geeki/install]] procedure, -updating and downgrading becomes quite straightforward: +upgrading and downgrading is straightforward: {{{ cd wiki diff --git a/nwiz b/nwiz deleted file mode 100644 index 331906c..0000000 --- a/nwiz +++ /dev/null @@ -1,116 +0,0 @@ -== nwiz, the code editor for a more civilized era == - -=== What's this? === - -** My goal is to use [[https://neovim.io/ | Neovim]] as a modern coding environment for C, C++, Rust, Python and other languages. ** - -
{{nvim-completion.png | maxwidth=600}}
- -Neovim has no shortage of powerful plugins for programmers, but it's a fast moving ecosystem. -Picking the right combination of plugins and configuring them as an integrated development -environment is still far from trivial. I also reviewed a number of GUIs and "super plugins" -which aim to be a complete IDE, but all of them had maturity and usability issues. - -I curated a list of well-maintained plugins that take advantage of Neovim's built-in IDE components: - - * Language Server Protocol, for semantic completion - * Treesitter, for semantic syntax highlighting - * Virtual text, for inline diagnostics - * Floating windows, for inline help and function parameter assistance - -The plugin ecosystem is still maturing, but over time the amount of Lua scripting required -to piece together a fully functional IDE seems to be going down. Ideally, you wouldn't have -to learn Lua to edit your Neovim config. - -** I want a programmer's editor without becoming the editor's programmer! ** - - -=== Features === - - * Quickly open files with fuzzy search - * Semantic completion - * Configures language servers for C/C++, Rust, Python - * Adding more languages made easy by lspconfig - * Inline diagnostics and hints - - -=== Requirements === - -TODO: Minimum neovim version? - -TODO: Recommend a good terminal with undercurls, mouse support... - -TODO: Nerd fonts installation - - -=== Installation === - -To get started, download nwiz.lua to Neovim's plugin dir so it will be autoloaded at startup: - -{{{ - curl https://codewiz.org/pub/dotfiles/nwiz.lua -o ~/.config/nvim/plugin/nwiz.lua -}}} - -Everything is in a single file for ease of installation and to remind me to keep it short and simple. - -I'm also sharing my generic .vimrc, which doesn't use Lua and works with both Neovim and Vim 9: - -{{{ - curl https://codewiz.org/pub/dotfiles/vimrc -}}} - -Rather than overwrite your existing ##~./vimrc##, you might want to review and take some of my settings -for syntax highlighting and smart indentation. - - -=== Packer ==== - -On first run, Packer (the plugin manager) will bootstrap itself and install all plugins. -There's a good chance this will fail the first time due to the asynchronous nature of PackerSync -(patches welcome!) - -Any time you edit the list of plugins, run ##:PackerSync## to install, uninstall & update them. Easy! - -=== Language Servers === - -Neovim 0.7 comes with a built-in LSP client. The official [[https://github.com/neovim/nvim-lspconfig | nvim-lspconfig]] -plugin abstracts the details of spawning the correct Language Server for a multitude of filetypes. - -Download and installation of language servers can be managed automatically by -[[https://github.com/williamboman/nvim-lsp-installer | nvim-lsp-installer]], but I find that it's -simpler (and much safer!) to install the already packaged ones from Linux distro. This also ensures -that they stay aligned with the system toolchain. - - * Rust: rust-analyzer - * C++: clangd - * Python: python-lsp-server (which uses mypy, pylint, autopep8...) - -=== Treesitter syntax parsers === - -Install the ones you like from this list: https://github.com/nvim-treesitter/nvim-treesitter#supported-languages - -For instance, I installed these: - -{{{ -:TSInstall cpp rust lua python bash vim -}}} - -You can refresh your parsers at any time with ##:TSUpdate## - -=== Semantic completion === - -Just press TAB! - -TODO: docs for [[https://github.com/hrsh7th/nvim-cmp#readme | cmp-nvim]] - - -=== Finding and opening files === - -{{nvim-telescope.png | maxwidth=400}} - - -TODO: docs for [[https://github.com/nvim-telescope/telescope.nvim | telescope.nvim]] - -=== Realtime diagnostics and hints === - -TODO: document diff --git a/nwiz.lua b/nwiz.lua deleted file mode 100644 index 31a1af1..0000000 --- a/nwiz.lua +++ /dev/null @@ -1,346 +0,0 @@ --- --- “This is the editor of a Real Coder. --- Not as clumsy as a full blown IDE. --- An elegant editor for a more civilized age.” --- ― Bernie Innocenti, https://codewiz.org --- - --- Set this to replace GitHub default URLs --- local github_url = 'https://github.com/' -local github_url = 'git@github.com:' - --- Bootstrap Packer if not already installed -local fn = vim.fn -local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' -if fn.empty(fn.glob(install_path)) > 0 then - local packer_url = github_url .. "wbthomason/packer.nvim" - print("Bootstrapping packer from ", packer_url) - packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', packer_url, install_path}) -end - -require('packer').startup({function(use) - use 'wbthomason/packer.nvim' - use { 'nvim-treesitter/nvim-treesitter', - run = function() require('nvim-treesitter.install').update({ with_sync = true }) end, } - use { 'nvim-telescope/telescope.nvim', requires = { {'nvim-lua/plenary.nvim'} } } - use { 'nvim-lualine/lualine.nvim', requires = { 'kyazdani42/nvim-web-devicons', opt = true } } - use { 'kyazdani42/nvim-tree.lua', requires = { 'kyazdani42/nvim-web-devicons', }, tag = 'nightly' } - use 'dstein64/nvim-scrollview' - - use 'neovim/nvim-lspconfig' - use 'hrsh7th/cmp-nvim-lsp' - use 'hrsh7th/cmp-buffer' - use 'hrsh7th/cmp-path' - use 'hrsh7th/cmp-cmdline' - use 'hrsh7th/nvim-cmp' - use 'hrsh7th/cmp-vsnip' - use 'hrsh7th/vim-vsnip' - -- use 'hrsh7th/cmp-nvim-lsp-signature-help' - use "ray-x/lsp_signature.nvim" - - if packer_bootstrap then - -- FIXME: this runs asynchronously, causing the rest of the - -- lua script to fail on first run - require('packer').sync() - end -end, -config = { - git = { default_url_format = github_url .. '%s.git' } -}}) - --- nvim-treesitter -- - -if github_url ~= nil then - -- Replace GitHub url for all treesitter plugins - for _, config in pairs(require("nvim-treesitter.parsers").get_parser_configs()) do - config.install_info.url = config.install_info.url:gsub("https://github.com/", github_url) - end -end - -require("nvim-treesitter.install").prefer_git = true -require("nvim-treesitter.configs").setup { - highlight = { - enable = true, - }, -} - -local opts = { noremap=true, silent=true } -local map = vim.api.nvim_set_keymap - -require("telescope").setup() -map('n', '', 'Telescope git_files', opts) -map('n', 'ff', 'Telescope find_files', opts) -map('n', 'fg', 'Telescope live_grep', opts) -map('n', 'fb', 'Telescope buffers', opts) -map('n', 'fh', 'Telescope help_tags', opts) - -require("nvim-tree").setup() -map('n', 'o', ':NvimTreeFocus', opts) -map('n', '', ':NvimTreeClose', opts) -map('n', '', ':NvimTreeFindFile', opts) - -require('lualine').setup { - options = { - theme = 'codedark', - section_separators = { left = '', right = '' }, - component_separators = { left = '', right = '' }, - -- section_separators = '', component_separators = '', - show_filename_only = false, - globalstatus = false, - }, - sections = { - lualine_a = { - { 'mode', fmt = function(str) return str:sub(1,1) end } - }, - lualine_b = { - { 'branch', fmt = function(branch) return branch == 'master' and '' or branch end }, - }, - lualine_c = { - { 'filename', path = 1, }, - }, - lualine_x = { - { 'filetype', icon_only = true, }, - }, - lualine_y = {}, - }, -} - --- nvim-cmp -- - -local kind_icons = { - Text = "", - Method = "", - Function = "", - Constructor = "", - Field = "", - Variable = "", - Class = "ﴯ", - Interface = "", - Module = "", - Property = "ﰠ", - Unit = "", - Value = "", - Enum = "", - Keyword = "", - Snippet = "", - Color = "", - File = "", - Reference = "", - Folder = "", - EnumMember = "", - Constant = "", - Struct = "", - Event = "", - Operator = "", - TypeParameter = "" -} - -local has_words_before = function() - local line, col = unpack(vim.api.nvim_win_get_cursor(0)) - return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil -end - -local feedkey = function(key, mode) - vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true) -end - -local cmp = require'cmp' -cmp.setup({ - -- view = { entries = "native" }, - formatting = { - fields = { - "kind", - "abbr", - "menu", - }, - format = function(entry, vim_item) - vim_item.kind = kind_icons[vim_item.kind] - local max_width = 25 - if vim_item.menu ~= nil and string.len(vim_item.menu) > max_width then - vim_item.menu = string.sub(vim_item.menu, 1, max_width - 1) .. "…" - end - return vim_item - end, - }, - snippet = { - -- REQUIRED - you must specify a snippet engine - expand = function(args) - vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. - end, - }, - mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }), - [''] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }), - [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), - [''] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `` mapping. - [''] = cmp.mapping({ - i = cmp.mapping.abort(), - c = cmp.mapping.close(), - }), - [''] = cmp.mapping.confirm({ select = true }), - - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif vim.fn["vsnip#available"](1) == 1 then - feedkey("(vsnip-expand-or-jump)", "") - elseif has_words_before() then - cmp.complete() - else - fallback() -- Sends a already mapped key. In this case, it's probably ``. - end - end, { "i", "s" }), - - [""] = cmp.mapping(function() - if cmp.visible() then - cmp.select_prev_item() - elseif vim.fn["vsnip#jumpable"](-1) == 1 then - feedkey("(vsnip-jump-prev)", "") - end - end, { "i", "s" }), - }), - sources = cmp.config.sources({ - { name = 'nvim_lsp' }, - -- { name = 'nvim_lsp_signature_help', }, - }, { - { name = 'vsnip' }, - -- { name = 'buffer' }, - }) -}) - --- cmp.setup.cmdline('/', { --- mapping = cmp.mapping.preset.cmdline(), --- completion = { --- keyword_length = 2, --- }, --- sources = { --- { name = 'buffer' } --- } ---}) - -cmp.setup.cmdline(':', { - mapping = cmp.mapping.preset.cmdline(), - completion = { - keyword_length = 2, - }, - sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline' } - }) -}) - - -local capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) - --- Disable snippets support for rust-analyzer because it spams the completion -capabilities.textDocument.completion.completionItem.snippetSupport = false --- print(vim.inspect(capabilities)) - --- lsp-config -- - --- vim.lsp.set_log_level("debug") -vim.diagnostic.config({ - underline = true, - virtual_text = false, - update_in_insert = false, - float = { - focusable = false, - style = 'minimal', - border = 'rounded', - source = 'always', - header = '', - prefix = '', - } -}) - -local on_attach = function(client, bufnr) - local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end - local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end - - buf_set_option("formatexpr", "v:lua.vim.lsp.formatexpr()") - buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") - buf_set_option("tagfunc", "v:lua.vim.lsp.tagfunc") - - vim.opt.completeopt = {"menu", "menuone", "noinsert"} - - require "lsp_signature".on_attach({ - hi_parameter = "IncSearch" - }) - - local opts = { noremap=true, silent=true } - -- See `:help vim.lsp.*` for documentation on any of the below functions - buf_set_keymap('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) - buf_set_keymap('n', '', 'lua vim.lsp.buf.declaration()', opts) - buf_set_keymap('n', 'gd', 'lua vim.lsp.buf.definition()', opts) - buf_set_keymap('n', 'K', 'lua vim.lsp.buf.hover()', opts) - buf_set_keymap('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) - buf_set_keymap('n', '', 'lua vim.lsp.buf.signature_help()', opts) - buf_set_keymap('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) - buf_set_keymap('n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) - buf_set_keymap('n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) - buf_set_keymap('n', 'D', 'lua vim.lsp.buf.type_definition()', opts) - buf_set_keymap('n', 'rn', 'lua vim.lsp.buf.rename()', opts) - buf_set_keymap('n', 'ca', 'lua vim.lsp.buf.code_action()', opts) - buf_set_keymap('n', 'gr', 'lua vim.lsp.buf.references()', opts) - - buf_set_keymap('n', 'e', 'lua vim.diagnostic.open_float()', opts) - buf_set_keymap('n', 'q', 'lua vim.diagnostic.setloclist()', opts) - buf_set_keymap('n', '[d', 'lua vim.diagnostic.goto_prev()', opts) - buf_set_keymap('n', ']d', 'lua vim.diagnostic.goto_next()', opts) - - buf_set_keymap('n', "=", "lua vim.lsp.buf.formatting()", opts) - buf_set_keymap('v', "=", "lua vim.lsp.buf.formatting()", opts) - buf_set_keymap('n', "gq", "lua vim.lsp.buf.formatting()", opts) - buf_set_keymap('v', "gq", "lua vim.lsp.buf.formatting()", opts) -end - -local lspconfig = require'lspconfig'; -lspconfig.rust_analyzer.setup{ - on_attach = on_attach, - capabilities = capabilities, -} -lspconfig.tsserver.setup{ - on_attach = on_attach, - capabilities = capabilities, -} -lspconfig.clangd.setup{ - on_attach = on_attach, - capabilities = capabilities, - -- cmd = { vim.loop.os_homedir() .. "clangd", "--background-index" }, - cmd = { "clangd", "--background-index" }, - root_dir = lspconfig.util.root_pattern("compile_commands.json", "compile_flags.txt"), -} -lspconfig.pylsp.setup{ - on_attach = on_attach, - capabilities = capabilities, - settings = { - pylsp = { - configurationSources = {"pylint"}, - plugins = { - autopep8 = { enabled = true }, - mypy = { enabled = true }, - pylint = { enabled = true }, - flake8 = { enabled = false }, - pycodestyle = { enabled = false }, - pyflakes = { enabled = false }, - } - } - } -} - --- Alt-key window navication and more -map('t', '', 'h', opts) -map('t', '', 'j', opts) -map('t', '', 'k', opts) -map('t', '', 'l', opts) -map('i', '', 'h', opts) -map('i', '', 'j', opts) -map('i', '', 'k', opts) -map('i', '', 'l', opts) -map('n', '', 'h', opts) -map('n', '', 'j', opts) -map('n', '', 'k', opts) -map('n', '', 'l', opts) - diff --git a/vimrc b/vimrc deleted file mode 100644 index 3d0e348..0000000 --- a/vimrc +++ /dev/null @@ -1,312 +0,0 @@ -" Copyright 2004, 2005, 2008 Develer S.r.l. (http://www.develer.com/) -" Copyright 2009-2022 Bernie Innocenti -" -" Author: Bernie Innocenti -" Author: Simone Zinanni -" Author: Stefano Fedrigo -" Author: Daniele Varrazzo -" -" note: to reload this file after a change, use ':so %' - -set nocompatible " Use Vim defaults (much better!) -set bs=indent,eol,start " allow backspacing over everything in insert mode -set history=1000 -set ruler " show the cursor position all the time -set laststatus=2 " Always show the status line at the bottom (neovim) -set clipboard+=unnamed,unnamedplus - -augroup fedora - autocmd! - " In text files, always limit the width of text to 78 characters - autocmd BufRead *.txt set tw=78 - " When editing a file, always jump to the last cursor position - autocmd BufReadPost * - \ if line("'\"") > 0 && line ("'\"") <= line("$") | - \ exe "normal! g'\"" | - \ endif - " don't write swapfile on most commonly used directories for NFS mounts or USB sticks - autocmd BufNewFile,BufReadPre /media/*,/run/media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp - " start with spec file template - autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec -augroup END - -" Switch syntax highlighting on, when the terminal has colors -" Also switch on highlighting the last used search pattern. -if &t_Co > 2 || has("gui_running") - syntax on - " bernie: hilighting long lines is very slow - set synmaxcol=320 - set hlsearch - set incsearch - set background=dark - - " bernie: Show matching parenthesis when writing - set showmatch - " bernie: add bottom horizontal scroll bar - set guioptions+=b - " aleph: remove useless luser toolbar - set guioptions-=T - - " highlighting for embedded LUA in nvim - let g:vimsyn_embed='l' - - " bernie: highlight cursor line - set cursorline - set colorcolumn=+1 - - " Limit modern terminal stuff to known-good terminals - if has("gui_running") || $KONSOLE_VERSION != '' || $VTE_VERSION != '' || $XTERM_VERSION != '' || $WEZTERM_EXECUTABLE != '' - if has('termguicolors') - set termguicolors - endif - colorscheme darkblue - - highlight Normal ctermfg=248 ctermbg=NONE guibg=#000818 guifg=#eeeeee - highlight Visual guibg=fg guifg=#4040d0 gui=reverse - - " Make the splits look pretty - highlight VertSplit guibg=#001111 guifg=#224422 - - " bernie: blinky cursor! - " let &guicursor = &guicursor . ',a:blinkwait175-blinkoff10-blinkon20' - - " Enable spelling for comments in various languates - " bernie: don't enable by default because has too many false positives - "autocmd FileType c,cpp,java,python,rust,vim,text set spell - endif - - " Make the wrap column and cursor line more discrete - highlight CursorLine term=NONE cterm=NONE ctermbg=233 guibg=#001133 - highlight CursorColumn term=NONE cterm=NONE ctermbg=233 guibg=#000820 - highlight ColorColumn term=NONE cterm=NONE ctermbg=233 guibg=#200818 - - " The autocomplete menu - highlight Pmenu ctermfg=250 ctermbg=240 guifg=#ABB2BF guibg=#282C34 - highlight PmenuSel ctermfg=253 ctermbg=245 guifg=#353B45 guibg=#A3BE8C - highlight PmenuSbar ctermbg=248 guibg=#353b45 - highlight PmenuThumb ctermbg=15 guibg=#81A1C1 - - highlight! CmpItemAbbrDeprecated guibg=NONE gui=strikethrough guifg=#808080 - highlight! CmpItemAbbrMatch guibg=NONE guifg=#569CD6 - highlight! CmpItemAbbrMatchFuzzy guibg=NONE guifg=#569CD6 - highlight! CmpItemKindVariable guibg=NONE guifg=#9CDCFE - highlight! CmpItemKindInterface guibg=NONE guifg=#9CDCFE - highlight! CmpItemKindText guibg=NONE guifg=#9CDCFE - highlight! CmpItemKindFunction guibg=NONE guifg=#C586C0 - highlight! CmpItemKindMethod guibg=NONE guifg=#C586C0 - highlight! CmpItemKindKeyword guibg=NONE guifg=#D4D4D4 - highlight! CmpItemKindProperty guibg=NONE guifg=#D4D4D4 - highlight! CmpItemKindUnit guibg=NONE guifg=#D4D4D4 - - highlight DiagnosticVirtualTextHint guifg=#444444 - highlight DiagnosticVirtualTextWarn guifg=#884400 - highlight DiagnosticVirtualTextError guifg=#880000 - highlight DiagnosticUnderlineHint gui=NONE - highlight DiagnosticUnderlineWarn cterm=undercurl ctermfg=Brown gui=undercurl guisp=#884400 - highlight DiagnosticUnderlineError cterm=undercurl ctermfg=Red gui=undercurl guisp=#880000 - - sign define DiagnosticSignError text= linehl= texthl=DiagnosticSignError numhl= - sign define DiagnosticSignWarn text= linehl= texthl=DiagnosticSignWarn numhl= - sign define DiagnosticSignInfo text= linehl= texthl=DiagnosticSignInfo numhl= - sign define DiagnosticSignHint text=? linehl= texthl=DiagnosticSignHint numhl= - autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {scope = "line", focus = false}) - - " Undercurl speling erors in terminal and gui - " let &t_Cs = "\e[4:3m" - " let &t_Ce = "\e[4:0m" - highlight SpellBad term=NONE cterm=undercurl ctermfg=Red ctermbg=NONE guifg=NONE gui=undercurl guisp=Red - highlight SpellCap term=NONE cterm=undercurl ctermfg=Yellow ctermbg=NONE guifg=NONE gui=undercurl guisp=Yellow - highlight SpellRare term=NONE cterm=undercurl ctermfg=Blue ctermbg=NONE guifg=NONE gui=undercurl guisp=Blue - highlight SpellLocal term=NONE cterm=undercurl ctermfg=Brown ctermbg=NONE guifg=NONE gui=undercurl guisp=Brown - - " Highlight extra whitespace in various languages - autocmd FileType c,cpp,rust highlight ExtraWhitespace ctermbg=DarkRed guibg=DarkRed -endif - -" bernie: insensitive search -set ignorecase -" aleph: if pattern contains uppercase chars, the search is case _sensitive_ -set smartcase - -" bernie: horizontal and vertical scrolling -set nowrap -set sidescroll=1 -set sidescrolloff=3 -set scrolloff=3 -set listchars+=extends:»,precedes:«,trail:-,nbsp:_,tab:\|_ -" set fillchars+=vert:\▏ -set wildmenu - -" piro: fix broken Page Up/Down -" http://vimrc-dissection.blogspot.com/2009/02/fixing-pageup-and-pagedown.html -map 1000 -map 1000 -imap 1000 -imap 1000 -set nostartofline - -" bernie: enter in directory browser open files in previous window -" let g:netrw_browse_split=4 - -" bernie: write on :n, :r, etc. -set autowriteall - -" aleph: dont't break softlinks (edit destination file), but break hardlinks -set backupcopy=yes,breakhardlink - -" bernie: mouse everywhere! -if has("mouse") - set mouse=a - if !has('nvim') - set ttymouse=xterm2 - endif -endif - -" bernie: do not create swap files all over the place -set directory-=. - -" bernie: enable persistent undo -"if has('persistent_undo') -" let &undodir=&directory -" set undofile -"endif - -" aleph: per non rompere le p*** a chi sta attorno ogni volta che si sbaglia tasto -set visualbell -" aleph: riduce al minimo la dimensione dei buffer non attivi -set winminheight=0 -" aleph: dopo split e close gli altri buffer non si ridimensionano -set noequalalways -" show (partial) command in status line -set showcmd - -" bernie: status line -set statusline=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P - -" informs sh syntax that /bin/sh is actually bash -let is_bash=1 - -" bernie: enable loading filetype specific plugins and indendation modes -filetype plugin indent on -set smarttab -set matchpairs+=<:> -set shiftround -set shiftwidth=0 " 0 means same as ts - -" bernie: set default indents for various languages -autocmd FileType c,cpp set ts=4|set expandtab|let c_space_errors=1 -autocmd FileType java set ts=4|set expandtab|let java_space_errors=1|let java_highlight_functions=1 -autocmd FileType rust set ts=4|set expandtab -autocmd FileType python set ts=4|set expandtab -autocmd FileType go,lua set ts=2|set expandtab -autocmd FileType html,css set ts=2|set expandtab -autocmd FileType javascript,typescript set ts=2|set expandtab -autocmd FileType vim set ts=2|set expandtab - -" bernie: auxiliary named config files -au BufNewFile,BufRead named.conf.*,named-*.conf setf named - -" piro: treat arduino projects as C++ files. -autocmd BufRead *.pde set filetype=cpp - -" bernie: bind '#' to 'grep word under cursor' -- see: http://vim.wikia.com/wiki/Find_in_files_within_Vim -:map # :execute "vimgrep /" . expand("") . "/j **" cw - -" bernie: search for highlighted text -- see: http://rayninfo.co.uk/vimtips.html -:vmap // y/" - -" piro: no, I don't want your fucking help! -inoremap -nnoremap -vnoremap - -" what's ; for anyway? -noremap ; : - -" w!! if you forget to sudo before saving -cmap w!! w !sudo tee % >/dev/null - -" Repeat last command and put cursor at start of change -- http://vim.wikia.com/wiki/VimTip1142 -map . .`[ - -" Go back to previous file -map :bp - -" bernie: see http://www.vim.org/scripts/script.php?script_id=3896 -map :Bufferlist - -" bernie: ex mode is useless and annoying -map Q - -" bernie: http://vim.wikia.com/wiki/Edit_gpg_encrypted_files#Comments -augroup encrypted - au! - " Disable swap files, and set binary file format before reading the file - autocmd BufReadPre,FileReadPre *.gpg - \ setlocal noswapfile bin - " Decrypt the contents after reading the file, reset binary file format - " and run any BufReadPost autocmds matching the file name without the .gpg - " extension - autocmd BufReadPost,FileReadPost *.gpg - \ execute "'[,']!gpg --decrypt --default-recipient-self" | - \ setlocal nobin | - \ execute "doautocmd BufReadPost " . expand("%:r") - " Set binary file format and encrypt the contents before writing the file - autocmd BufWritePre,FileWritePre *.gpg - \ setlocal bin | - \ '[,']!gpg --encrypt --default-recipient-self - " After writing the file, do an :undo to revert the encryption in the - " buffer, and reset binary file format - autocmd BufWritePost,FileWritePost *.gpg - \ silent u | - \ setlocal nobin -augroup END - -set updatetime=1000 -set shortmess+=c - -if has('persistent_undo') - let &undodir=&directory - set undofile -endif - -let g:plug_url_format = 'git@github.com:%s.git' -call plug#begin('~/.vim/plugged') - Plug 'wsdjeg/vim-fetch' - "Plug 'editorconfig/editorconfig-vim' - Plug 'junegunn/fzf' - Plug 'junegunn/fzf.vim' - Plug 'haya14busa/vim-asterisk' - Plug 'tikhomirov/vim-glsl' - Plug 'tpope/vim-fugitive' -call plug#end() - -" == FZF == -nmap :FZF - - -" == vim-asterisk == -let g:asterisk#keeppos = 1 -map * (asterisk-*) -map # (asterisk-#) -map g* (asterisk-g*) -map g# (asterisk-g#) -map z* (asterisk-z*) -map gz* (asterisk-gz*) -map z# (asterisk-z#) -map gz# (asterisk-gz#) - - -" == rust.vim == -autocmd FileType rust noremap gq -autocmd FileType rust inoremap gq - -if has('nvim') - set inccommand=nosplit - set signcolumn=number -endif " nvim - -" source user's local configuration file if available -if filereadable($HOME . "/.vimrc.local") - source ~/.vimrc.local -endif diff --git a/wezterm b/wezterm deleted file mode 100644 index 5086864..0000000 --- a/wezterm +++ /dev/null @@ -1,70 +0,0 @@ -local wezterm = require 'wezterm'; - -return { - automatically_reload_config = true, - enable_scroll_bar = true, - - -- color_scheme = "Batman", - -- font = wezterm.font("Lucida Console", {}), - -- font = wezterm.font("Noto Sans Mono", {}), - font_size = 9.0, - harfbuzz_features = {"calt=0", "clig=0", "liga=0"}, - - audible_bell = "Disabled", - visual_bell = { - fade_in_duration_ms = 0, - fade_out_duration_ms = 50, - target = "BackgroundColor", - -- target = "CursorColor", - }, - colors = { - cursor_bg = "yellow", - cursor_fg = "black", - visual_bell = "#661111", - split = "#888888", - }, - window_background_opacity = 1.0, - window_background_gradient = { - orientation = "Vertical", - colors = { - "#222244", - "#111133", - "#110808" - }, - -- preset = "Warm", - interpolation = "Linear", - blend = "Rgb", - noise = 64, - -- segment_size = 50, - -- segment_smoothness = 0.0, - }, - inactive_pane_hsb = { - saturation = 0.7, - brightness = 1.0, - }, - - default_prog = {os.getenv("HOME") .. "/bin/zsh"}, - keys = { - -- {key="r", mods="CMD|SHIFT", action="ReloadConfiguration"}, - {mods="CTRL|SHIFT", key="d", action=wezterm.action{SplitVertical={domain="CurrentPaneDomain"}}}, - {mods="CTRL|SHIFT", key="r", action=wezterm.action{SplitHorizontal={domain="CurrentPaneDomain"}}}, - {mods="CTRL|SHIFT", key="w", action=wezterm.action{CloseCurrentPane={confirm=true}}}, - {mods="CTRL|SHIFT", key="f", action="ToggleFullScreen"}, - }, - - ssh_domains = { - { - name = "desk", - remote_address = "binnocenti-z2.spacex.corp", - remote_wezterm_path = "/home/binnocenti/bin/wezterm", - username = "binnocenti", - } - }, - tls_clients = { - { - name = "desktls", - remote_address = "binnocenti-z2.spacex.corp:8080", - bootstrap_via_ssh = "binnocenti@binnocenti-z2.spacex.corp", - } - }, -} \ No newline at end of file