diff options
author | Yigit Sever | 2020-05-09 14:44:19 +0300 |
---|---|---|
committer | Yigit Sever | 2020-05-09 14:44:19 +0300 |
commit | b75d7a2b07e1fd189084da3ffafeab090278e95d (patch) | |
tree | 57fba12525d2cff8c29f08852e878fc25c367f5e /.config/nvim | |
parent | 5de2c4d480ba0c88ca4ffae4a6defc5890f43477 (diff) | |
download | dotfiles-b75d7a2b07e1fd189084da3ffafeab090278e95d.tar.gz dotfiles-b75d7a2b07e1fd189084da3ffafeab090278e95d.tar.bz2 dotfiles-b75d7a2b07e1fd189084da3ffafeab090278e95d.zip |
bunch of vimrc changes
Diffstat (limited to '.config/nvim')
-rwxr-xr-x | .config/nvim/init.vim | 52 |
1 files changed, 33 insertions, 19 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index c4eb3b4..3ea30d7 100755 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim | |||
@@ -1,6 +1,9 @@ | |||
1 | "{{{ Plugs | 1 | "{{{ Plugs |
2 | call plug#begin('~/.local/share/nvim/plugged') | 2 | call plug#begin('~/.local/share/nvim/plugged') |
3 | 3 | ||
4 | " latex " had to move vimtex to top to avoid a difficult error | ||
5 | Plug 'lervag/vimtex' | ||
6 | |||
4 | " completion | 7 | " completion |
5 | Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } | 8 | Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } |
6 | Plug 'lionawurscht/deoplete-biblatex' | 9 | Plug 'lionawurscht/deoplete-biblatex' |
@@ -26,7 +29,7 @@ Plug 'tmsvg/pear-tree' | |||
26 | Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | 29 | Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } |
27 | Plug 'junegunn/fzf.vim' | 30 | Plug 'junegunn/fzf.vim' |
28 | 31 | ||
29 | " tree explorer | 32 | " tree explorer, i don't use this as much but don't like netrw either |
30 | Plug 'scrooloose/nerdtree' | 33 | Plug 'scrooloose/nerdtree' |
31 | " displays tags ordered by scope | 34 | " displays tags ordered by scope |
32 | Plug 'majutsushi/tagbar' | 35 | Plug 'majutsushi/tagbar' |
@@ -42,31 +45,25 @@ Plug 'vimwiki/vimwiki' | |||
42 | Plug 'junegunn/goyo.vim' | 45 | Plug 'junegunn/goyo.vim' |
43 | " highlights the current paragraph | 46 | " highlights the current paragraph |
44 | Plug 'junegunn/limelight.vim' | 47 | Plug 'junegunn/limelight.vim' |
45 | " latex | ||
46 | Plug 'lervag/vimtex' | ||
47 | 48 | ||
48 | " text alignment | 49 | " text alignment \w :Tab |
49 | Plug 'godlygeek/tabular' | 50 | Plug 'godlygeek/tabular' |
50 | " move selections up and down | 51 | " move selections up and down with alt+[j,k] |
51 | Plug 'matze/vim-move' | 52 | Plug 'matze/vim-move' |
52 | " search/select/edit sandwiched textobjects | 53 | " surround text objects; sa, sr and sd |
53 | Plug 'machakann/vim-sandwich' | 54 | Plug 'machakann/vim-sandwich' |
54 | " provide additional text objects | 55 | " provide additional text objects |
55 | Plug 'wellle/targets.vim' | 56 | Plug 'wellle/targets.vim' |
56 | " indentation level text object | 57 | " indentation level text object, ia, ii |
57 | Plug 'michaeljsmith/vim-indent-object' | 58 | Plug 'michaeljsmith/vim-indent-object' |
58 | " visual feedback for substitute holy shit this is amazing | 59 | " visual feedback for substitute holy shit this is amazing |
59 | Plug 'markonm/traces.vim' | 60 | Plug 'markonm/traces.vim' |
60 | " insert mode completions from tmux panes | ||
61 | Plug 'wellle/tmux-complete.vim' | ||
62 | " see the contents of registers on "/<CTRL-R> | 61 | " see the contents of registers on "/<CTRL-R> |
63 | Plug 'junegunn/vim-peekaboo' | 62 | Plug 'junegunn/vim-peekaboo' |
64 | " use <leader>k to highlight multiple words | 63 | " use <leader>k to highlight multiple words |
65 | Plug 'lfv89/vim-interestingwords' | 64 | Plug 'lfv89/vim-interestingwords' |
66 | " swap delimited items | 65 | " swap delimited items using g>, g< |
67 | Plug 'machakann/vim-swap' | 66 | Plug 'machakann/vim-swap' |
68 | " highliht occurances of word | ||
69 | Plug 'lfv89/vim-interestingwords' | ||
70 | 67 | ||
71 | " reopen files at your last edit position | 68 | " reopen files at your last edit position |
72 | Plug 'farmergreg/vim-lastplace' | 69 | Plug 'farmergreg/vim-lastplace' |
@@ -74,7 +71,7 @@ Plug 'farmergreg/vim-lastplace' | |||
74 | Plug 'airblade/vim-gitgutter' | 71 | Plug 'airblade/vim-gitgutter' |
75 | " Conflict merger | 72 | " Conflict merger |
76 | Plug 'christoomey/vim-conflicted' | 73 | Plug 'christoomey/vim-conflicted' |
77 | " jump to location by 2 characters | 74 | " jump to location by 2 characters, ` |
78 | Plug 'justinmk/vim-sneak' | 75 | Plug 'justinmk/vim-sneak' |
79 | 76 | ||
80 | " splits delete into cut and delete | 77 | " splits delete into cut and delete |
@@ -104,7 +101,6 @@ Plug 'tpope/vim-dispatch' | |||
104 | " fancy start screen | 101 | " fancy start screen |
105 | Plug 'mhinz/vim-startify' | 102 | Plug 'mhinz/vim-startify' |
106 | Plug 'ryanoasis/vim-devicons' " asks to be placed last, sure | 103 | Plug 'ryanoasis/vim-devicons' " asks to be placed last, sure |
107 | |||
108 | call plug#end() " required | 104 | call plug#end() " required |
109 | 105 | ||
110 | "}}} | 106 | "}}} |
@@ -124,6 +120,19 @@ autocmd VimResized * :wincmd = | |||
124 | autocmd FileType markdown,tex setlocal spell | 120 | autocmd FileType markdown,tex setlocal spell |
125 | "}}} | 121 | "}}} |
126 | 122 | ||
123 | " Functions {{{ | ||
124 | function! CreatePaper(citekey) | ||
125 | exe "e! " . fnameescape("~/Nextcloud/personal_wiki/papers/" . a:citekey . ".wiki") | ||
126 | |||
127 | let l:timestap="Report Created at: " . strftime("%c") | ||
128 | let l:text="= Came From =\n\n= Takeaways =\n\n= Might Go To =\n\n" | ||
129 | |||
130 | put! =l:timestap | ||
131 | put =l:text | ||
132 | |||
133 | endfunction | ||
134 | " }}} Function " | ||
135 | |||
127 | "{{{Misc Settings | 136 | "{{{Misc Settings |
128 | 137 | ||
129 | " Use deoplete. | 138 | " Use deoplete. |
@@ -197,6 +206,10 @@ colorscheme onedark | |||
197 | 206 | ||
198 | "{{{ Mappings | 207 | "{{{ Mappings |
199 | 208 | ||
209 | " If you like "Y" to work from the cursor to the end of line (which is more | ||
210 | " logical, but not Vi-compatible) | ||
211 | map Y y$ | ||
212 | |||
200 | " Open the TagBar Plugin <F3> | 213 | " Open the TagBar Plugin <F3> |
201 | nnoremap <silent> <F3> :TagbarToggle<CR> | 214 | nnoremap <silent> <F3> :TagbarToggle<CR> |
202 | " Open NERDTree <F4> | 215 | " Open NERDTree <F4> |
@@ -326,11 +339,12 @@ let g:ledger_fillstring = ' ~' | |||
326 | 339 | ||
327 | "{{{ UltiSnips | 340 | "{{{ UltiSnips |
328 | set runtimepath+=~/.vim/my-snippets/ | 341 | set runtimepath+=~/.vim/my-snippets/ |
329 | let g:UltiSnipsEditSplit="vertical" | 342 | let g:UltiSnipsEditSplit = "vertical" |
330 | let g:UltiSnipsSnippetsDir=$HOME.'/.vim/my-snippets/UltiSnips' | 343 | let g:UltiSnipsSnippetsDir = $HOME.'/.vim/my-snippets/UltiSnips' |
331 | 344 | ||
332 | " ctrl + l expands the snippet, c + j/k navigates placeholders | 345 | " ctrl + l expands the snippet, c + j/k navigates placeholders |
333 | let g:UltiSnipsExpandTrigger = "<C-l>" | 346 | let g:UltiSnipsExpandTrigger = "<C-l>" |
347 | let g:UltiSnipsEnableSnipMate = "1" | ||
334 | "}}} | 348 | "}}} |
335 | 349 | ||
336 | "{{{ vim-startify | 350 | "{{{ vim-startify |
@@ -370,10 +384,10 @@ let g:vimwiki_global_ext = 0 | |||
370 | "}}} | 384 | "}}} |
371 | 385 | ||
372 | " {{{ vimtex | 386 | " {{{ vimtex |
373 | let g:vimtex_view_method = 'zathura' | 387 | let g:vimtex_view_method='zathura' |
374 | let g:tex_flavor='latex' | 388 | let g:tex_flavor='latex' |
375 | let g:vimtex_quickfix_mode = 0 | 389 | let g:vimtex_quickfix_mode=0 |
376 | let g:polyglot_disabled = ['latex', 'tex', 'ledger'] | 390 | let g:polyglot_disabled=['latex', 'tex', 'ledger'] |
377 | " }}} | 391 | " }}} |
378 | 392 | ||
379 | " {{{ Gutentags | 393 | " {{{ Gutentags |