From ce2d747ff3c6bee61e1cc4cf14f10127f0358b69 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 4 Apr 2019 15:18:51 +0300 Subject: Add sneak and commentary vim plugins --- .config/nvim/init.vim | 57 ++++++++++++++++++--------------------------------- 1 file changed, 20 insertions(+), 37 deletions(-) (limited to '.config/nvim') diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 06992d0..2bb1324 100755 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -42,8 +42,11 @@ Plug 'godlygeek/tabular' Plug 'dbeniamine/cheat.sh-vim' "color code highlight Plug 'chrisbra/Colorizer' + "comment helper -Plug 'scrooloose/nerdcommenter' +"Plug 'scrooloose/nerdcommenter' +Plug 'tpope/vim-commentary' + "folding ledger files Plug 'ledger/vim-ledger' "reporen files at your last edit position @@ -52,9 +55,14 @@ Plug 'farmergreg/vim-lastplace' Plug 'kshenoy/vim-signature' "git diff in the sign column Plug 'airblade/vim-gitgutter' +"jump to location by 2 characters +Plug 'justinmk/vim-sneak' +"splits delete into cut and delete Plug 'svermeulen/vim-cutlass' +"change text with yank Plug 'svermeulen/vim-subversive' +"yank history Plug 'svermeulen/vim-yoink' "enable repeating supported plugin maps with '.' @@ -69,9 +77,7 @@ Plug 'tpope/vim-fugitive' Plug 'tpope/vim-speeddating' "search, substitute and abbreviate Plug 'tpope/vim-abolish' -"helpers for unix -Plug 'tpope/vim-eunuch' -"unicode character metadata +"provides ga, show unicode stuff of char under cursor Plug 'tpope/vim-characterize' "fancy start screen @@ -98,18 +104,14 @@ autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isT "{{{Misc Settings let g:ycm_global_ycm_extra_conf = '~/.ycm_extra_conf.py' - " necesary for lots of cool vim things set nocompatible - " See below " https://stackoverflow.com/a/33380495 if !exists("g:syntax_on") syntax enable endif - set grepprg=grep\ -nH\ $* " DONT KNOW WHAT THIS DOES - " Tab stuff set autoindent set expandtab " Use appropriate number of spaces to insert a @@ -117,16 +119,13 @@ set smarttab set shiftwidth=4 set softtabstop=4 set tabstop=8 - " Use english for spellchecking, but don't spellcheck by default set spell spelllang=en_us set nospell - " Cool tab completion stuff set wildmenu set wildmode=list:longest,full set wildignore=*.o,*.obj,*.class - set encoding=utf-8 set scrolloff=4 " Keep n lines above/below cursor set mouse=c @@ -143,19 +142,12 @@ set showmatch " jump to the matching bracket briefly, REMOVE AFTER TESTING set linebreak " wrap using 'breakat' character set splitbelow " new split panes will split to below and right set splitright - " persistent undo set undodir=~/.vim/undodir set undofile - " lower case searches ignore case, upper case searches do not set ignorecase set smartcase - -" This is totally awesome - remap jj to escape in insert mode. You'll never type jj anyway, so it's great! -inoremap jj -nnoremap JJJJ - " https://stackoverflow.com/a/3445040/ " switch case labels set cinoptions=l1 @@ -216,60 +208,47 @@ endfunction " Open Url on this line with the browser \w map w :call Browser () - " Open the TagBar Plugin nnoremap :TagbarToggle - " Open NERDTree nnoremap :NERDTreeToggle - " Next Tab nnoremap :tabnext - " Previous Tab nnoremap :tabprevious - " New Tab nnoremap :tabnew - " Rotate Color Scheme "nnoremap :execute RotateColorTheme() - " FixIt from YCM map :YcmCompleter FixIt - " Edit vimrc \ev nnoremap ev :tabnew:e ~/.config/nvim/init.vim - " Up and down are more logical with g.. nnoremap k gk nnoremap j gj inoremap gka inoremap gja - +" This is totally awesome - remap jj to escape in insert mode. You'll never type jj anyway, so it's great! +inoremap jj +nnoremap JJJJ " quicker window movement nnoremap j nnoremap k nnoremap h nnoremap l - " Disable highlight when is pressed map :noh - " Space will toggle folds! nnoremap za - " Search mappings: These will make it so that going to the next one in a " search will center on the line it's found in. map N Nzz map n nzz - "Insert timestamp nnoremap "=strftime("%F %T")P inoremap =strftime("%F %T") - nnoremap t "=strftime("%F")P - "}}} "{{{Tagbar @@ -399,14 +378,18 @@ map b VimwikiToggleListItem set clipboard=unnamed,unnamedplus " s for substitute -nmap s (SubversiveSubstitute) -nmap ss (SubversiveSubstituteLine) -nmap S (SubversiveSubstituteToEndOfLine) +nmap ys (SubversiveSubstitute) +nmap yss (SubversiveSubstituteLine) +nmap yS (SubversiveSubstituteToEndOfLine) nmap s (SubversiveSubstituteRange) xmap s (SubversiveSubstituteRange) nmap ss (SubversiveSubstituteWordRange) +nmap s (SubversiveSubvertRange) +xmap s (SubversiveSubvertRange) +nmap ss (SubversiveSubvertWordRange) + nmap (YoinkPostPasteSwapBack) nmap (YoinkPostPasteSwapForward) -- cgit v1.2.3-70-g09d2