From 67bba7481605d6ce2dd9325c8418ff4fa89477c0 Mon Sep 17 00:00:00 2001 From: Noah Masur Date: Sun, 11 Apr 2021 20:49:42 -0400 Subject: [PATCH] change vimrc to individual files --- nvim.configlink/init.vim | 329 +----------------------- nvim.configlink/settings/coc.vim | 61 +++++ nvim.configlink/settings/custom.vim | 84 ++++++ nvim.configlink/settings/general.vim | 57 ++++ nvim.configlink/settings/gitgutter.vim | 4 + nvim.configlink/settings/latex.vim | 10 + nvim.configlink/settings/lightline.vim | 15 ++ nvim.configlink/settings/netrw.vim | 9 + nvim.configlink/settings/plugins.vim | 39 +++ nvim.configlink/settings/polyglot.vim | 5 + nvim.configlink/settings/quickscope.vim | 5 + nvim.configlink/settings/snippets.vim | 17 ++ nvim.configlink/settings/vimwiki.vim | 17 ++ 13 files changed, 335 insertions(+), 317 deletions(-) create mode 100644 nvim.configlink/settings/coc.vim create mode 100644 nvim.configlink/settings/custom.vim create mode 100644 nvim.configlink/settings/general.vim create mode 100644 nvim.configlink/settings/gitgutter.vim create mode 100644 nvim.configlink/settings/latex.vim create mode 100644 nvim.configlink/settings/lightline.vim create mode 100644 nvim.configlink/settings/netrw.vim create mode 100644 nvim.configlink/settings/plugins.vim create mode 100644 nvim.configlink/settings/polyglot.vim create mode 100644 nvim.configlink/settings/quickscope.vim create mode 100644 nvim.configlink/settings/snippets.vim create mode 100644 nvim.configlink/settings/vimwiki.vim diff --git a/nvim.configlink/init.vim b/nvim.configlink/init.vim index 2a77a60..14c3b11 100644 --- a/nvim.configlink/init.vim +++ b/nvim.configlink/init.vim @@ -1,319 +1,14 @@ " Vim Config -" Plugins -"-------- - -" Install vim-plugged if not installed -if empty(glob('~/.config/nvim/autoload/plug.vim')) - silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs - \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - autocmd VimEnter * PlugInstall --sync | source ~/.config/nvim/init.vim -endif - -" All plugins -call plug#begin('~/.config/nvim/plugged') - -" Core plugins -Plug 'morhetz/gruvbox' " Colorscheme -Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } " Required for fuzzyfinder -Plug 'junegunn/fzf.vim' " Actual fuzzyfinder -Plug 'tpope/vim-surround' " Enables paren editing -Plug 'sheerun/vim-polyglot' " Syntax for every language -Plug 'airblade/vim-gitgutter' " Git next to line numbers -Plug 'tpope/vim-commentary' " Use gc or gcc to comment -Plug 'godlygeek/tabular' " Spacing and alignment - -" Ancillary plugins -Plug 'unblevable/quick-scope' " Hints for f and t -Plug 'vimwiki/vimwiki' " Wiki Markdown System -Plug 'jreybert/vimagit' " Git 'gui' buffer -Plug 'airblade/vim-rooter' " Change directory to git route -Plug 'tpope/vim-fugitive' " Other git commands -Plug 'machakann/vim-highlightedyank' " Highlight text when copied -Plug 'itchyny/lightline.vim' " Status bar -Plug 'tpope/vim-vinegar' " Fixes netrw file explorer -Plug 'lambdalisue/fern.vim' " File explorer / project drawer -Plug 'christoomey/vim-tmux-navigator' " Hotkeys for tmux panes - -" CoC (Language Server Protocol, requires NodeJS) -Plug 'neoclide/coc.nvim', {'branch': 'release'} " Code completion - -call plug#end() - -" Basic Settings -filetype plugin on " Load the plugin for current filetype (vimwiki) -syntax enable " Syntax highlighting -set termguicolors " Set to truecolor -colorscheme gruvbox " Installed in autoload/ and colors/ - -" Options -set hidden " Don't unload buffers when leaving them -set number " Show line numbers -set relativenumber " Relative numbers instead of absolute -set list " Reveal whitespace with --- -set expandtab " Tabs into spaces -set shiftwidth=4 " Amount to shift with > key -set softtabstop=4 " Amount to shift with key -set ignorecase " Ignore case when searching -set smartcase " Check case when using capitals in search -set infercase " Don't match cases when completing suggestions -set incsearch " Search while typing -set visualbell " No sounds -set scrolljump=1 " Scroll more than one line (or 1 line) -set scrolloff=3 " Margin of lines when to start scrolling -set splitright " Vertical splits on the right side -set splitbelow " Horizontal splits on the lower side -set pastetoggle= " Use F3 to enter raw paste mode -set clipboard+=unnamedplus " Uses system clipboard for yanking -set updatetime=300 " Faster diagnostics -set mouse=nv " Mouse interaction / scrolling - -" Neovim only -set inccommand=split " Live preview search and replace - -" Remember last position when reopening file -if has("autocmd") - au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif -endif - -" Better backup, swap and undo storage -set noswapfile " Instead of swaps, create backups (less annoying) -set backup " Easier to recover and more secure -set undofile " Keeps undos after quit -set backupdir=~/.config/nvim/dirs/backup -set undodir=~/.config/nvim/dirs/undo - -" Keep selection when tabbing -vnoremap < >gv - -" Create backup directories if they don't exist -if !isdirectory(&backupdir) - call mkdir(&backupdir, "p") -endif -if !isdirectory(&undodir) - call mkdir(&undodir, "p") -endif - -" Custom Commands -"---------------- - -command! Vimrc edit $MYVIMRC " Edit .vimrc (this file) -command! Refresh source $MYVIMRC " Refresh from .vimrc (this file) - -" Custom Keybinds -"---------------- - -" Map the leader key -map - -"This unsets the `last search pattern` register by hitting return -nnoremap :noh - -" Replace all -nnoremap S :%s//g - -" Jump to text in this directory -nnoremap / :Rg - -" Quit vim -nnoremap q :quit -nnoremap Q :quitall - -" Save file -nnoremap fs :write - -" Make file executable -nnoremap fe :!chmod 755 % - -" Make file normal permissions -nnoremap fn :!chmod 644 % - -" Open file in this directory -nnoremap ff :Files - -" Change directory to this file -nnoremap fd :lcd %:p:h - -" Back up directory -nnoremap fu :lcd .. - -" Open a recent file -nnoremap fr :History - -" Switch between multiple open files -nnoremap bb :Buffers - -" Jump to text in this file -nnoremap s :BLines - -" Start Magit buffer -nnoremap gs :Magit - -" Toggle Git gutter (by line numbers) -nnoremap ` :GitGutterToggle - -" Git push -nnoremap gp :Git push - -" Split window -nnoremap ws :vsplit - -" Close all other splits -nnoremap wm :only - -" Exit terminal mode (requires Alacritty escape) -tnoremap - -" Reload Vimrc settings -nnoremap rr :Refresh -nnoremap rp :Refresh :PlugInstall - -" Open file tree -noremap ft :Fern . -drawer -width=35 -toggle= - -" Tabularize -nnoremap ta :Tabularize / -nnoremap t# :Tabularize /# -nnoremap t" :Tabularize /" - -" Snippets -"--------- - -" Basic programming files -nnoremap ,sh :-1read $DOTS/shell/templates/skeleton.shGdd03kC -nnoremap ,py :-1read $DOTS/shell/templates/skeleton.pyGdd08kC - -" Kubernetes -nnoremap ,cm :-1read $DOTS/shell/templates/configmap.yamlGdd0gg -nnoremap ,sec :-1read $DOTS/shell/templates/secret.yamlGdd0gg -nnoremap ,dep :-1read $DOTS/shell/templates/deployment.yamlGdd0gg -nnoremap ,svc :-1read $DOTS/shell/templates/service.yamlGdd0gg -nnoremap ,cro :-1read $DOTS/shell/templates/clusterrole.yamlGdd0gg -nnoremap ,crb :-1read $DOTS/shell/templates/clusterrolebinding.yamlGdd0gg -nnoremap ,ro :-1read $DOTS/shell/templates/role.yamlGdd0gg -nnoremap ,rb :-1read $DOTS/shell/templates/rolebinding.yamlGdd0gg -nnoremap ,sa :-1read $DOTS/shell/templates/serviceaccount.yamlGdd0gg - -" LaTeX Settings -"--------------- - -" LaTeX Hotkeys -autocmd FileType tex inoremap ;bf \textbf{}i -" Jump to the next occurence of <> and replace it with insert mode -autocmd FileType tex nnoremap /<>:nohc2l - -" Autocompile LaTeX on save -autocmd BufWritePost *.tex silent! execute "!pdflatex -output-directory=%:p:h % >/dev/null 2>&1" | redraw! - -" Plugin Settings -"---------------- - -" Built-in file explorer plugin -let g:netrw_liststyle = 3 " Change style to 'tree' view -let g:netrw_banner = 0 " Remove useless banner -let g:netrw_winsize = 15 " Explore window takes % of page -let g:netrw_browse_split = 4 " Open in previous window -let g:netrw_altv = 1 " Always split left - -" Gitgutter plugin -let g:gitgutter_enabled = 1 " Enabled on start - -" Polyglot syntax plugin -let g:terraform_fmt_on_save=1 " Formats with terraform plugin -let g:rustfmt_autosave = 1 " Formats with rust plugin - -" VimWiki plugin -let g:vimwiki_list = [ - \ { - \ 'path': $NOTES_PATH, - \ 'syntax': 'markdown', - \ 'index': 'home', - \ 'ext': '.md' - \ } - \ ] -let g:vimwiki_key_mappings = - \ { - \ 'all_maps': 1, - \ 'mouse': 1, - \ } -let g:vimwiki_auto_chdir = 1 - -" Quickscope only highlight on keypress -let g:qs_highlight_on_keys = ['f', 'F', 't', 'T'] - -" Lightline status bar plugin -let g:lightline = { - \ 'colorscheme': 'jellybeans', - \ 'active': { - \ 'right': [[ 'lineinfo' ]], - \ 'left': [[ 'mode', 'paste' ], - \ [ 'cocstatus', 'readonly', 'relativepath', 'gitbranch', 'modified' ]] - \ }, - \ 'component_function': { - \ 'gitbranch': 'fugitive#head', - \ 'cocstatus': 'coc#status' - \ }, - \ } - -" CoC Settings -"------------- - -" Extensions to auto-install and enable -let g:coc_global_extensions = [ - \ 'coc-rust-analyzer', - \ 'coc-pairs', - \ 'coc-diagnostic', -\ ] - -" Set tab to completion -inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : - \ coc#refresh() -inoremap pumvisible() ? "\" : "\" - -function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction - -inoremap pumvisible() ? coc#_select_confirm() - \: "\u\\=coc#on_enter()\" - -" Use `[g` and `]g` to navigate diagnostics -" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list. -nmap [g (coc-diagnostic-prev) -nmap ]g (coc-diagnostic-next) - -" GoTo code navigation. -nmap gd (coc-definition) -nmap gy (coc-type-definition) -nmap gi (coc-implementation) -nmap gr (coc-references) - -" Use K to show documentation in preview window. -nnoremap K :call show_documentation() - -function! s:show_documentation() - if (index(['vim','help'], &filetype) >= 0) - execute 'h '.expand('') - else - call CocAction('doHover') - endif -endfunction - -" Highlight the symbol and its references when holding the cursor. -" Uses updatetime for delay before showing info. -autocmd CursorHold * silent call CocActionAsync('highlight') - -" Symbol renaming. -nmap rn (coc-rename) - -" Use CTRL-S for selections ranges. -" Requires 'textDocument/selectionRange' support of LS, ex: coc-tsserver -nmap (coc-range-select) -xmap (coc-range-select) - -" Use autocmd to force lightline update. -autocmd User CocStatusChange,CocDiagnosticChange call lightline#update() +source $HOME/.config/nvim/settings/plugins.vim " Plugins from vim-plug +source $HOME/.config/nvim/settings/general.vim " General settings +source $HOME/.config/nvim/settings/custom.vim " Custom commands and binds +source $HOME/.config/nvim/settings/snippets.vim " Handwritten snippets +source $HOME/.config/nvim/settings/latex.vim " LaTeX settings +source $HOME/.config/nvim/settings/netrw.vim " File explorer settings +source $HOME/.config/nvim/settings/gitgutter.vim " Gitgutter plugin settings +source $HOME/.config/nvim/settings/polyglot.vim " Polyglot plugin settings +source $HOME/.config/nvim/settings/vimwiki.vim " VimWiki plugin settings +source $HOME/.config/nvim/settings/quickscope.vim " Quickscope plugin settings +source $HOME/.config/nvim/settings/lightline.vim " Lightline plugin settings +source $HOME/.config/nvim/settings/coc.vim " CoC plugins settings diff --git a/nvim.configlink/settings/coc.vim b/nvim.configlink/settings/coc.vim new file mode 100644 index 0000000..d4a1e5d --- /dev/null +++ b/nvim.configlink/settings/coc.vim @@ -0,0 +1,61 @@ +" CoC Settings +"------------- + +" Extensions to auto-install and enable +let g:coc_global_extensions = [ + \ 'coc-rust-analyzer', + \ 'coc-pairs', + \ 'coc-diagnostic', +\ ] + +" Set tab to completion +inoremap + \ pumvisible() ? "\" : + \ check_back_space() ? "\" : + \ coc#refresh() +inoremap pumvisible() ? "\" : "\" + +function! s:check_back_space() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' +endfunction + +inoremap pumvisible() ? coc#_select_confirm() + \: "\u\\=coc#on_enter()\" + +" Use `[g` and `]g` to navigate diagnostics +" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list. +nmap [g (coc-diagnostic-prev) +nmap ]g (coc-diagnostic-next) + +" GoTo code navigation. +nmap gd (coc-definition) +nmap gy (coc-type-definition) +nmap gi (coc-implementation) +nmap gr (coc-references) + +" Use K to show documentation in preview window. +nnoremap K :call show_documentation() + +function! s:show_documentation() + if (index(['vim','help'], &filetype) >= 0) + execute 'h '.expand('') + else + call CocAction('doHover') + endif +endfunction + +" Highlight the symbol and its references when holding the cursor. +" Uses updatetime for delay before showing info. +autocmd CursorHold * silent call CocActionAsync('highlight') + +" Symbol renaming. +nmap rn (coc-rename) + +" Use CTRL-S for selections ranges. +" Requires 'textDocument/selectionRange' support of LS, ex: coc-tsserver +nmap (coc-range-select) +xmap (coc-range-select) + +" Use autocmd to force lightline update. +autocmd User CocStatusChange,CocDiagnosticChange call lightline#update() diff --git a/nvim.configlink/settings/custom.vim b/nvim.configlink/settings/custom.vim new file mode 100644 index 0000000..1e10940 --- /dev/null +++ b/nvim.configlink/settings/custom.vim @@ -0,0 +1,84 @@ +" Custom Commands +"---------------- + +command! Vimrc edit $MYVIMRC " Edit .vimrc (this file) +command! Refresh source $MYVIMRC " Refresh from .vimrc (this file) + +" Custom Keybinds +"---------------- + +" Map the leader key +map + +"This unsets the `last search pattern` register by hitting return +nnoremap :noh + +" Replace all +nnoremap S :%s//g + +" Jump to text in this directory +nnoremap / :Rg + +" Quit vim +nnoremap q :quit +nnoremap Q :quitall + +" Save file +nnoremap fs :write + +" Make file executable +nnoremap fe :!chmod 755 % + +" Make file normal permissions +nnoremap fn :!chmod 644 % + +" Open file in this directory +nnoremap ff :Files + +" Change directory to this file +nnoremap fd :lcd %:p:h + +" Back up directory +nnoremap fu :lcd .. + +" Open a recent file +nnoremap fr :History + +" Switch between multiple open files +nnoremap b :Buffers + +" Switch between two open files +nnoremap :b# + +" Jump to text in this file +nnoremap s :BLines + +" Start Magit buffer +nnoremap gs :Magit + +" Toggle Git gutter (by line numbers) +nnoremap ` :GitGutterToggle + +" Git push +nnoremap gp :Git push + +" Split window +nnoremap ws :vsplit + +" Close all other splits +nnoremap wm :only + +" Exit terminal mode (requires Alacritty escape) +tnoremap + +" Reload Vimrc settings +nnoremap rr :Refresh +nnoremap rp :Refresh :PlugInstall + +" Open file tree +noremap ft :Fern . -drawer -width=35 -toggle= + +" Tabularize +nnoremap ta :Tabularize / +nnoremap t# :Tabularize /# +nnoremap t" :Tabularize /" diff --git a/nvim.configlink/settings/general.vim b/nvim.configlink/settings/general.vim new file mode 100644 index 0000000..40ceb11 --- /dev/null +++ b/nvim.configlink/settings/general.vim @@ -0,0 +1,57 @@ +" General +"-------- + +" Basic Settings +filetype plugin on " Load the plugin for current filetype (vimwiki) +syntax enable " Syntax highlighting +set termguicolors " Set to truecolor +colorscheme gruvbox " Installed in autoload/ and colors/ + +" Options +set hidden " Don't unload buffers when leaving them +set number " Show line numbers +set relativenumber " Relative numbers instead of absolute +set list " Reveal whitespace with --- +set expandtab " Tabs into spaces +set shiftwidth=4 " Amount to shift with > key +set softtabstop=4 " Amount to shift with key +set ignorecase " Ignore case when searching +set smartcase " Check case when using capitals in search +set infercase " Don't match cases when completing suggestions +set incsearch " Search while typing +set visualbell " No sounds +set scrolljump=1 " Scroll more than one line (or 1 line) +set scrolloff=3 " Margin of lines when to start scrolling +set splitright " Vertical splits on the right side +set splitbelow " Horizontal splits on the lower side +set pastetoggle= " Use F3 to enter raw paste mode +set clipboard+=unnamedplus " Uses system clipboard for yanking +set updatetime=300 " Faster diagnostics +set mouse=nv " Mouse interaction / scrolling + +" Neovim only +set inccommand=split " Live preview search and replace + +" Remember last position when reopening file +if has("autocmd") + au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif +endif + +" Better backup, swap and undo storage +set noswapfile " Instead of swaps, create backups (less annoying) +set backup " Easier to recover and more secure +set undofile " Keeps undos after quit +set backupdir=~/.config/nvim/dirs/backup +set undodir=~/.config/nvim/dirs/undo + +" Keep selection when tabbing +vnoremap < >gv + +" Create backup directories if they don't exist +if !isdirectory(&backupdir) + call mkdir(&backupdir, "p") +endif +if !isdirectory(&undodir) + call mkdir(&undodir, "p") +endif diff --git a/nvim.configlink/settings/gitgutter.vim b/nvim.configlink/settings/gitgutter.vim new file mode 100644 index 0000000..f3ca301 --- /dev/null +++ b/nvim.configlink/settings/gitgutter.vim @@ -0,0 +1,4 @@ +" Gitgutter plugin +"---------------- + +let g:gitgutter_enabled = 1 " Enabled on start diff --git a/nvim.configlink/settings/latex.vim b/nvim.configlink/settings/latex.vim new file mode 100644 index 0000000..93c3b34 --- /dev/null +++ b/nvim.configlink/settings/latex.vim @@ -0,0 +1,10 @@ +" LaTeX Settings +"--------------- + +" LaTeX Hotkeys +autocmd FileType tex inoremap ;bf \textbf{}i +" Jump to the next occurence of <> and replace it with insert mode +autocmd FileType tex nnoremap /<>:nohc2l + +" Autocompile LaTeX on save +autocmd BufWritePost *.tex silent! execute "!pdflatex -output-directory=%:p:h % >/dev/null 2>&1" | redraw! diff --git a/nvim.configlink/settings/lightline.vim b/nvim.configlink/settings/lightline.vim new file mode 100644 index 0000000..cc700a6 --- /dev/null +++ b/nvim.configlink/settings/lightline.vim @@ -0,0 +1,15 @@ +" Lightline Status Bar +"--------------------- + +let g:lightline = { + \ 'colorscheme': 'jellybeans', + \ 'active': { + \ 'right': [[ 'lineinfo' ]], + \ 'left': [[ 'mode', 'paste' ], + \ [ 'cocstatus', 'readonly', 'relativepath', 'gitbranch', 'modified' ]] + \ }, + \ 'component_function': { + \ 'gitbranch': 'fugitive#head', + \ 'cocstatus': 'coc#status' + \ }, + \ } diff --git a/nvim.configlink/settings/netrw.vim b/nvim.configlink/settings/netrw.vim new file mode 100644 index 0000000..2ed4298 --- /dev/null +++ b/nvim.configlink/settings/netrw.vim @@ -0,0 +1,9 @@ +" Plugin Settings +"---------------- + +" Built-in file explorer plugin +let g:netrw_liststyle = 3 " Change style to 'tree' view +let g:netrw_banner = 0 " Remove useless banner +let g:netrw_winsize = 15 " Explore window takes % of page +let g:netrw_browse_split = 4 " Open in previous window +let g:netrw_altv = 1 " Always split left diff --git a/nvim.configlink/settings/plugins.vim b/nvim.configlink/settings/plugins.vim new file mode 100644 index 0000000..679c1e9 --- /dev/null +++ b/nvim.configlink/settings/plugins.vim @@ -0,0 +1,39 @@ +" Plugins +"-------- + +" Install vim-plugged if not installed +if empty(glob('$HOME/.config/nvim/autoload/plug.vim')) + silent !curl -fLo $HOME/.config/nvim/autoload/plug.vim --create-dirs + \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + autocmd VimEnter * PlugInstall --sync | source $HOME/.config/nvim/init.vim +endif + +" All plugins +call plug#begin('$HOME/.config/nvim/plugged') + +" Core plugins +Plug 'morhetz/gruvbox' " Colorscheme +Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } " Required for fuzzyfinder +Plug 'junegunn/fzf.vim' " Actual fuzzyfinder +Plug 'tpope/vim-surround' " Enables paren editing +Plug 'sheerun/vim-polyglot' " Syntax for every language +Plug 'airblade/vim-gitgutter' " Git next to line numbers +Plug 'tpope/vim-commentary' " Use gc or gcc to comment +Plug 'godlygeek/tabular' " Spacing and alignment + +" Ancillary plugins +Plug 'unblevable/quick-scope' " Hints for f and t +Plug 'vimwiki/vimwiki' " Wiki Markdown System +Plug 'jreybert/vimagit' " Git 'gui' buffer +Plug 'airblade/vim-rooter' " Change directory to git route +Plug 'tpope/vim-fugitive' " Other git commands +Plug 'machakann/vim-highlightedyank' " Highlight text when copied +Plug 'itchyny/lightline.vim' " Status bar +Plug 'tpope/vim-vinegar' " Fixes netrw file explorer +Plug 'lambdalisue/fern.vim' " File explorer / project drawer +Plug 'christoomey/vim-tmux-navigator' " Hotkeys for tmux panes + +" CoC (Language Server Protocol, requires NodeJS) +Plug 'neoclide/coc.nvim', {'branch': 'release'} " Code completion + +call plug#end() diff --git a/nvim.configlink/settings/polyglot.vim b/nvim.configlink/settings/polyglot.vim new file mode 100644 index 0000000..5437b01 --- /dev/null +++ b/nvim.configlink/settings/polyglot.vim @@ -0,0 +1,5 @@ +" Polyglot Syntax +"---------------- + +let g:terraform_fmt_on_save=1 " Formats with terraform plugin +let g:rustfmt_autosave = 1 " Formats with rust plugin diff --git a/nvim.configlink/settings/quickscope.vim b/nvim.configlink/settings/quickscope.vim new file mode 100644 index 0000000..4841112 --- /dev/null +++ b/nvim.configlink/settings/quickscope.vim @@ -0,0 +1,5 @@ +" Quickscope +"----------- + +" Only highlight on keypress +let g:qs_highlight_on_keys = ['f', 'F', 't', 'T'] diff --git a/nvim.configlink/settings/snippets.vim b/nvim.configlink/settings/snippets.vim new file mode 100644 index 0000000..9fe0e6c --- /dev/null +++ b/nvim.configlink/settings/snippets.vim @@ -0,0 +1,17 @@ +" Snippets +"--------- + +" Basic programming files +nnoremap ,sh :-1read $DOTS/shell/templates/skeleton.shGdd03kC +nnoremap ,py :-1read $DOTS/shell/templates/skeleton.pyGdd08kC + +" Kubernetes +nnoremap ,cm :-1read $DOTS/shell/templates/configmap.yamlGdd0gg +nnoremap ,sec :-1read $DOTS/shell/templates/secret.yamlGdd0gg +nnoremap ,dep :-1read $DOTS/shell/templates/deployment.yamlGdd0gg +nnoremap ,svc :-1read $DOTS/shell/templates/service.yamlGdd0gg +nnoremap ,cro :-1read $DOTS/shell/templates/clusterrole.yamlGdd0gg +nnoremap ,crb :-1read $DOTS/shell/templates/clusterrolebinding.yamlGdd0gg +nnoremap ,ro :-1read $DOTS/shell/templates/role.yamlGdd0gg +nnoremap ,rb :-1read $DOTS/shell/templates/rolebinding.yamlGdd0gg +nnoremap ,sa :-1read $DOTS/shell/templates/serviceaccount.yamlGdd0gg diff --git a/nvim.configlink/settings/vimwiki.vim b/nvim.configlink/settings/vimwiki.vim new file mode 100644 index 0000000..d7891d7 --- /dev/null +++ b/nvim.configlink/settings/vimwiki.vim @@ -0,0 +1,17 @@ +" VimWiki +"-------- + +let g:vimwiki_list = [ + \ { + \ 'path': $NOTES_PATH, + \ 'syntax': 'markdown', + \ 'index': 'home', + \ 'ext': '.md' + \ } + \ ] +let g:vimwiki_key_mappings = + \ { + \ 'all_maps': 1, + \ 'mouse': 1, + \ } +let g:vimwiki_auto_chdir = 1