From b75d7a2b07e1fd189084da3ffafeab090278e95d Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sat, 9 May 2020 14:44:19 +0300 Subject: bunch of vimrc changes --- .config/nvim/init.vim | 52 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 19 deletions(-) (limited to '.config/nvim') 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 @@ "{{{ Plugs call plug#begin('~/.local/share/nvim/plugged') +" latex " had to move vimtex to top to avoid a difficult error +Plug 'lervag/vimtex' + " completion Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } Plug 'lionawurscht/deoplete-biblatex' @@ -26,7 +29,7 @@ Plug 'tmsvg/pear-tree' Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf.vim' -" tree explorer +" tree explorer, i don't use this as much but don't like netrw either Plug 'scrooloose/nerdtree' " displays tags ordered by scope Plug 'majutsushi/tagbar' @@ -42,31 +45,25 @@ Plug 'vimwiki/vimwiki' Plug 'junegunn/goyo.vim' " highlights the current paragraph Plug 'junegunn/limelight.vim' -" latex -Plug 'lervag/vimtex' -" text alignment +" text alignment \w :Tab Plug 'godlygeek/tabular' -" move selections up and down +" move selections up and down with alt+[j,k] Plug 'matze/vim-move' -" search/select/edit sandwiched textobjects +" surround text objects; sa, sr and sd Plug 'machakann/vim-sandwich' " provide additional text objects Plug 'wellle/targets.vim' -" indentation level text object +" indentation level text object, ia, ii Plug 'michaeljsmith/vim-indent-object' " visual feedback for substitute holy shit this is amazing Plug 'markonm/traces.vim' -" insert mode completions from tmux panes -Plug 'wellle/tmux-complete.vim' " see the contents of registers on "/ Plug 'junegunn/vim-peekaboo' " use k to highlight multiple words Plug 'lfv89/vim-interestingwords' -" swap delimited items +" swap delimited items using g>, g< Plug 'machakann/vim-swap' -" highliht occurances of word -Plug 'lfv89/vim-interestingwords' " reopen files at your last edit position Plug 'farmergreg/vim-lastplace' @@ -74,7 +71,7 @@ Plug 'farmergreg/vim-lastplace' Plug 'airblade/vim-gitgutter' " Conflict merger Plug 'christoomey/vim-conflicted' -" jump to location by 2 characters +" jump to location by 2 characters, ` Plug 'justinmk/vim-sneak' " splits delete into cut and delete @@ -104,7 +101,6 @@ Plug 'tpope/vim-dispatch' " fancy start screen Plug 'mhinz/vim-startify' Plug 'ryanoasis/vim-devicons' " asks to be placed last, sure - call plug#end() " required "}}} @@ -124,6 +120,19 @@ autocmd VimResized * :wincmd = autocmd FileType markdown,tex setlocal spell "}}} +" Functions {{{ +function! CreatePaper(citekey) + exe "e! " . fnameescape("~/Nextcloud/personal_wiki/papers/" . a:citekey . ".wiki") + + let l:timestap="Report Created at: " . strftime("%c") + let l:text="= Came From =\n\n= Takeaways =\n\n= Might Go To =\n\n" + + put! =l:timestap + put =l:text + +endfunction +" }}} Function " + "{{{Misc Settings " Use deoplete. @@ -197,6 +206,10 @@ colorscheme onedark "{{{ Mappings +" If you like "Y" to work from the cursor to the end of line (which is more +" logical, but not Vi-compatible) +map Y y$ + " Open the TagBar Plugin nnoremap :TagbarToggle " Open NERDTree @@ -326,11 +339,12 @@ let g:ledger_fillstring = ' ~' "{{{ UltiSnips set runtimepath+=~/.vim/my-snippets/ -let g:UltiSnipsEditSplit="vertical" -let g:UltiSnipsSnippetsDir=$HOME.'/.vim/my-snippets/UltiSnips' +let g:UltiSnipsEditSplit = "vertical" +let g:UltiSnipsSnippetsDir = $HOME.'/.vim/my-snippets/UltiSnips' " ctrl + l expands the snippet, c + j/k navigates placeholders let g:UltiSnipsExpandTrigger = "" +let g:UltiSnipsEnableSnipMate = "1" "}}} "{{{ vim-startify @@ -370,10 +384,10 @@ let g:vimwiki_global_ext = 0 "}}} " {{{ vimtex -let g:vimtex_view_method = 'zathura' +let g:vimtex_view_method='zathura' let g:tex_flavor='latex' -let g:vimtex_quickfix_mode = 0 -let g:polyglot_disabled = ['latex', 'tex', 'ledger'] +let g:vimtex_quickfix_mode=0 +let g:polyglot_disabled=['latex', 'tex', 'ledger'] " }}} " {{{ Gutentags -- cgit v1.2.3-70-g09d2