summaryrefslogtreecommitdiffstats
path: root/.config/nvim/init.vim
diff options
context:
space:
mode:
authorYigit Sever2020-05-14 13:40:37 +0300
committerYigit Sever2020-05-14 13:40:37 +0300
commit632ea038519b58312c5bed7ad8788d4e46cfa12a (patch)
treed19da88f3c5bd897dca6a2634b98bfb9989c8176 /.config/nvim/init.vim
parent7d97392d13c548b6ca9a1ecde41c29f28ed0c061 (diff)
parentbaf7fef97f1fe2f1bbe8159f5a5a928a2eba73be (diff)
downloaddotfiles-632ea038519b58312c5bed7ad8788d4e46cfa12a.tar.gz
dotfiles-632ea038519b58312c5bed7ad8788d4e46cfa12a.tar.bz2
dotfiles-632ea038519b58312c5bed7ad8788d4e46cfa12a.zip
Merge branch 'master' of 207.154.210.186:/home/yigit/dots
Diffstat (limited to '.config/nvim/init.vim')
-rwxr-xr-x.config/nvim/init.vim68
1 files changed, 42 insertions, 26 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index fb68190..36e62c0 100755
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -1,6 +1,9 @@
1"{{{ Plugs 1"{{{ Plugs
2call plug#begin('~/.local/share/nvim/plugged') 2call plug#begin('~/.local/share/nvim/plugged')
3 3
4" latex " had to move vimtex to top to avoid a difficult error
5Plug 'lervag/vimtex'
6
4" completion 7" completion
5Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } 8Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
6Plug 'lionawurscht/deoplete-biblatex' 9Plug 'lionawurscht/deoplete-biblatex'
@@ -26,15 +29,16 @@ Plug 'tmsvg/pear-tree'
26Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } 29Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
27Plug 'junegunn/fzf.vim' 30Plug 'junegunn/fzf.vim'
28 31
29" tree explorer 32" tree explorer, i don't use this as much but don't like netrw either
30Plug 'scrooloose/nerdtree' 33Plug 'scrooloose/nerdtree'
31" displays tags ordered by scope 34" displays tags ordered by scope
32Plug 'majutsushi/tagbar' 35Plug 'majutsushi/tagbar'
33" status/tabline 36" status/tabline
34Plug 'bling/vim-airline' 37Plug 'vim-airline/vim-airline'
38Plug 'vim-airline/vim-airline-themes'
35 39
36" color theme of $CURRENT_YEAR 40" color theme of $CURRENT_YEAR
37Plug 'joshdick/onedark.vim' 41Plug 'bluz71/vim-moonfly-colors'
38 42
39" Personal wiki 43" Personal wiki
40Plug 'vimwiki/vimwiki' 44Plug 'vimwiki/vimwiki'
@@ -42,28 +46,24 @@ Plug 'vimwiki/vimwiki'
42Plug 'junegunn/goyo.vim' 46Plug 'junegunn/goyo.vim'
43" highlights the current paragraph 47" highlights the current paragraph
44Plug 'junegunn/limelight.vim' 48Plug 'junegunn/limelight.vim'
45" latex
46Plug 'lervag/vimtex'
47 49
48" text alignment 50" text alignment \w :Tab
49Plug 'godlygeek/tabular' 51Plug 'godlygeek/tabular'
50" move selections up and down 52" move selections up and down with alt+[j,k]
51Plug 'matze/vim-move' 53Plug 'matze/vim-move'
52" search/select/edit sandwiched textobjects 54" surround text objects; sa, sr and sd
53Plug 'machakann/vim-sandwich' 55Plug 'machakann/vim-sandwich'
54" provide additional text objects 56" provide additional text objects
55Plug 'wellle/targets.vim' 57Plug 'wellle/targets.vim'
56" indentation level text object 58" indentation level text object, ia, ii
57Plug 'michaeljsmith/vim-indent-object' 59Plug 'michaeljsmith/vim-indent-object'
58" visual feedback for substitute 60" visual feedback for substitute holy shit this is amazing
59Plug 'markonm/traces.vim' 61Plug 'markonm/traces.vim'
60" insert mode completions from tmux panes
61Plug 'wellle/tmux-complete.vim'
62" see the contents of registers on "/<CTRL-R> 62" see the contents of registers on "/<CTRL-R>
63Plug 'junegunn/vim-peekaboo' 63Plug 'junegunn/vim-peekaboo'
64" use <leader>k to highlight multiple words 64" use <leader>k to highlight multiple words
65Plug 'lfv89/vim-interestingwords' 65Plug 'lfv89/vim-interestingwords'
66" swap delimited items 66" swap delimited items using g>, g<
67Plug 'machakann/vim-swap' 67Plug 'machakann/vim-swap'
68 68
69" reopen files at your last edit position 69" reopen files at your last edit position
@@ -72,7 +72,7 @@ Plug 'farmergreg/vim-lastplace'
72Plug 'airblade/vim-gitgutter' 72Plug 'airblade/vim-gitgutter'
73" Conflict merger 73" Conflict merger
74Plug 'christoomey/vim-conflicted' 74Plug 'christoomey/vim-conflicted'
75" jump to location by 2 characters 75" jump to location by 2 characters, `
76Plug 'justinmk/vim-sneak' 76Plug 'justinmk/vim-sneak'
77 77
78" splits delete into cut and delete 78" splits delete into cut and delete
@@ -102,7 +102,6 @@ Plug 'tpope/vim-dispatch'
102" fancy start screen 102" fancy start screen
103Plug 'mhinz/vim-startify' 103Plug 'mhinz/vim-startify'
104Plug 'ryanoasis/vim-devicons' " asks to be placed last, sure 104Plug 'ryanoasis/vim-devicons' " asks to be placed last, sure
105
106call plug#end() " required 105call plug#end() " required
107 106
108"}}} 107"}}}
@@ -122,6 +121,19 @@ autocmd VimResized * :wincmd =
122autocmd FileType markdown,tex setlocal spell 121autocmd FileType markdown,tex setlocal spell
123"}}} 122"}}}
124 123
124" Functions {{{
125function! CreatePaper(citekey)
126 exe "e! " . fnameescape("~/Nextcloud/personal_wiki/papers/" . a:citekey . ".wiki")
127
128 let l:timestap="Report Created at: " . strftime("%c")
129 let l:text="= Came From =\n\n= Takeaways =\n\n= Might Go To =\n\n"
130
131 put! =l:timestap
132 put =l:text
133
134endfunction
135" }}} Function "
136
125"{{{Misc Settings 137"{{{Misc Settings
126 138
127" Use deoplete. 139" Use deoplete.
@@ -182,19 +194,23 @@ if executable('rg')
182 set grepprg=rg\ --vimgrep\ --no-heading\ --smart-case 194 set grepprg=rg\ --vimgrep\ --no-heading\ --smart-case
183endif 195endif
184 196
185set diffopt+=internal,algorithm:patience 197set diffopt=algorithm:patience
186 198
187" }}} 199" }}}
188 200
189"{{{Look and Feel 201"{{{Look and Feel
190let g:onedark_terminal_italics=1
191set termguicolors 202set termguicolors
192colorscheme onedark 203colorscheme moonfly
204let g:moonflyUndercurls = 0
193 205
194" }}} 206" }}}
195 207
196"{{{ Mappings 208"{{{ Mappings
197 209
210" If you like "Y" to work from the cursor to the end of line (which is more
211" logical, but not Vi-compatible)
212map Y y$
213
198" Open the TagBar Plugin <F3> 214" Open the TagBar Plugin <F3>
199nnoremap <silent> <F3> :TagbarToggle<CR> 215nnoremap <silent> <F3> :TagbarToggle<CR>
200" Open NERDTree <F4> 216" Open NERDTree <F4>
@@ -230,8 +246,8 @@ nnoremap <C-l> <C-w>l
230 246
231" Disable highlight when <leader><cr> is pressed 247" Disable highlight when <leader><cr> is pressed
232nnoremap <silent> <Leader><cr> :noh<cr> 248nnoremap <silent> <Leader><cr> :noh<cr>
233" Space will toggle folds! 249" Space used to toggle folds, now it's x (because x is d)
234nnoremap <space> za 250nnoremap <space> "_x
235 251
236" checkmarks on vimwiki 252" checkmarks on vimwiki
237nmap <Leader>v <Plug>VimwikiToggleListItem 253nmap <Leader>v <Plug>VimwikiToggleListItem
@@ -287,7 +303,6 @@ let g:tagbar_width = 25
287 303
288"{{{ Airline 304"{{{ Airline
289let g:airline_powerline_fonts = 1 305let g:airline_powerline_fonts = 1
290let g:airline_theme='onedark'
291let g:airline#extensions#tabline#formatter = 'unique_tail' 306let g:airline#extensions#tabline#formatter = 'unique_tail'
292let g:airline#extensions#tabline#enabled = 1 307let g:airline#extensions#tabline#enabled = 1
293let g:airline_mode_map = {} 308let g:airline_mode_map = {}
@@ -324,11 +339,12 @@ let g:ledger_fillstring = ' ~'
324 339
325"{{{ UltiSnips 340"{{{ UltiSnips
326set runtimepath+=~/.vim/my-snippets/ 341set runtimepath+=~/.vim/my-snippets/
327let g:UltiSnipsEditSplit="vertical" 342let g:UltiSnipsEditSplit = "vertical"
328let g:UltiSnipsSnippetsDir=$HOME.'/.vim/my-snippets/UltiSnips' 343let g:UltiSnipsSnippetsDir = $HOME.'/.vim/my-snippets/UltiSnips'
329 344
330" ctrl + l expands the snippet, c + j/k navigates placeholders 345" ctrl + l expands the snippet, c + j/k navigates placeholders
331let g:UltiSnipsExpandTrigger = "<C-l>" 346let g:UltiSnipsExpandTrigger = "<C-l>"
347let g:UltiSnipsEnableSnipMate = "1"
332"}}} 348"}}}
333 349
334"{{{ vim-startify 350"{{{ vim-startify
@@ -368,10 +384,10 @@ let g:vimwiki_global_ext = 0
368"}}} 384"}}}
369 385
370" {{{ vimtex 386" {{{ vimtex
371let g:vimtex_view_method = 'zathura' 387let g:vimtex_view_method='zathura'
372let g:tex_flavor='latex' 388let g:tex_flavor='latex'
373let g:vimtex_quickfix_mode = 0 389let g:vimtex_quickfix_mode=0
374let g:polyglot_disabled = ['latex', 'tex', 'ledger'] 390let g:polyglot_disabled=['latex', 'tex', 'ledger']
375" }}} 391" }}}
376 392
377" {{{ Gutentags 393" {{{ Gutentags