dotfiles

<-- duh.
Log | Files | Refs | LICENSE

commit 7dbc313d19ed46805953846486d2adb2f64c2f5c
parent 4cf693cd62ce260c296d94791a4fb2012a65e4c4
Author: hhvn <dev@hhvn.uk>
Date:   Tue, 26 Oct 2021 16:44:47 +0100

.c/n/init.vim: remove stuff I've never used

Diffstat:
M.config/nvim/init.vim | 117+++++++++----------------------------------------------------------------------
1 file changed, 13 insertions(+), 104 deletions(-)

diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim @@ -15,14 +15,13 @@ " quickscope - find stuff easer "Persistant undo -set undodir=~/.local/share/nvim/ +set undodir=~/.local/share/nvim/undo set undofile set undolevels=1000 set undoreload=10000 "Leader let mapleader=";" -let maplocalleader=',' "Cursor let &t_SI.="\033[6 q" "SI = INSERT mode @@ -32,11 +31,8 @@ let &t_EI.="\033[2 q" "EI = NORMAL mode (ELSE) "Tab completion set path+=** -"Misc set encoding=utf-8 set title - -"Set scheme syntax on set termguicolors colo hhvn @@ -47,17 +43,6 @@ set hlsearch filetype plugin on set noshowmode -"Fold -set foldmethod=marker - -"Leader keys -noremap <leader>vv :edit ~/.config/nvim/init.vim<CR> -noremap <leader>vz :vsplit ~/.config/nvim/init.vim<CR> -noremap <leader>vZ :split ~/.config/nvim/init.vim<CR> -noremap <leader>vs :source ~/.config/nvim/init.vim<CR> -map <leader><leader><leader> <leader>vs -noremap <leader>r :call ReopenFile()<CR> - function! ReopenFile() let curfile=expand('%:p') echom curfile @@ -65,61 +50,22 @@ function! ReopenFile() execute 'edit' . curfile endfunction -noremap <leader>q :qa!<CR> -noremap <leader>g :Goyo \| set linebreak<CR> -noremap <leader>cd :chdir -noremap <leader>ca :ColorizerAttachToBuffer<CR> -noremap <leader>cd :ColorizerDetachFromBuffer<CR> -noremap <leader>C :!sudo make all install clean<CR> -noremap <leader>CC :call Centre()<CR> -noremap <leader>Cc :call PlaceCC()<CR> -noremap <leader>oc :!groff -T pdf % - > /tmp/grff \| zathura -<Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left> -noremap <leader>sv :!sent % \| set linebreak<CR> +noremap <leader>vs :source ~/.config/nvim/init.vim<CR> +noremap <leader>r :call ReopenFile()<CR> +noremap <leader>m :make noremap <leader>sc :setlocal spell! spelllang=en_gb \| set linebreak<CR> noremap <leader>sf mm[s1z=`m<CR> noremap <leader>ssf mm[sz=`m -noremap <leader>Ff :r !find \| set linebreak<CR> -noremap <leader>Fl :r !ls \| set linebreak<CR> -noremap <leader>bd :bdelete \| set linebreak<CR> -noremap <leader>bn :bn \| set linebreak<CR> -noremap <leader>bp :bp \| set linebreak<CR> -noremap <leader>mvg :r !find -maxdepth 1 -type f -printf "mv \"\%f\"\t<++>\n"<Enter> -noremap <leader>mvd :w! /tmp/bmv-edit \| set linebreak<CR>:!sh /tmp/bmv-edit \| set linebreak<CR>:q \| set linebreak<CR> +noremap <leader>bd :bdelete<CR> +noremap <leader>bn :bn<CR> +noremap <leader>bp :bp<CR> noremap <leader>ss :set syntax= -inoremap <leader><leader>ss <Esc>:set syntax= -noremap <leader>w :w \| set linebreak<CR> -noremap <leader>w! :w !sudo tee %<CR> -noremap <leader>wq :x!<CR> -noremap <leader>" ea"<esc>bi"<esc> -noremap <leader>u" ds" -noremap <leader>' ea'<esc>bi'<esc> -noremap <leader>u' ds' -noremap <leader>sp o<esc>pi -noremap <leader>Ee :edit -noremap <leader>EE :edit -noremap <leader>yv :reg<CR> noremap <leader>8 :set colorcolumn=80<CR>:set tw=80<CR>:set fo+=t<CR> -noremap <leader>Gi :!git -noremap <leader>P :w !nc haydenh.null 9999<CR> -noremap <leader>l 80a-<esc> - -function SE(output, recipient, pass) - :exec ':w !gpg --encrypt --sign --armor --batch --output ' . a:output . ' -r ' . a:recipient . ' --passphrase ' . a:pass .' /dev/stdin' -endfunction - -noremap <leader>SE :call SE(")<left> - -noremap <leader>nn :set number! relativenumber!<CR> -noremap <leader><leader>nn :setlocal number! relativenumber!<CR> - +noremap <leader>g :!git +noremap <leader>nn :setlocal number! relativenumber!<CR> noremap <leader>j 0/<++><Enter>"_c4l noremap <leader>J 0/<++><Enter>"_d4l -inoremap <leader><leader>j <Esc>0/<++><Enter>"_c4l -noremap <leader>C i<++><Esc> -inoremap <leader><leader>c <++><Enter> - -inoremap <c-;> <esc>: -noremap <localleader>V ggO# vim: :<left><left> +nnoremap <leader>CS :let @/=''<CR> "General stuff noremap dw diw @@ -133,33 +79,12 @@ noremap mu ddkkp noremap <c-U> viwU noremap <c-i> viwu -"Insert mode -inoremap <c-d> <esc>ddi -inoremap <c-c> <esc>cci -inoremap <c-r> <esc>lr -inoremap <c-R> <esc>lR -inoremap <c-p> <esc>lpli -inoremap <c-P> <esc>lPli - -"Folds +"Fold +set foldmethod=marker nnoremap <silent> <Space> @=(foldlevel('.')?'za':"\<Space>")<CR> vnoremap <Space> zf -"Magit -noremap <leader>m :Magit \| set linebreak<CR> -let g:magit_default_fold_level=0 - -"Vimling -noremap <leader>ld :call ToggleDeadKeys()<CR> -inoremap <leader>ld <esc>:call ToggleDeadKeys()<CR>a -noremap <leader>li :call ToggleIPA()<CR> -inoremap <leader>li <esc>:call ToggleIPA()<CR>a - -"An erotic file-browser -noremap <leader>ev :Lexplore \| set linebreak<CR> -noremap <leader>ee :Explore -noremap <leader>eo :browse oldfiles \| set linebreak<CR> -noremap <leader>eb 100j +"Netrw let g:netrw_liststyle=3 let g:netrw_banner=0 let g:netrw_altv=1 @@ -175,25 +100,9 @@ ino <Down> <Nop> ino <Left> <Nop> ino <Right> <Nop> -"Navigate in insert mode -inoremap <C-j> <down> -inoremap <C-k> <up> -inoremap <C-l> <right> -inoremap <C-h> <left> - -"Search -nnoremap <leader>CS :let @/=''<CR> - "Registers set clipboard=unnamed -"Terminals -nnoremap <leader>Tt :vsplit term://ksh<CR><c-h><c-l> -nnoremap <leader>TT :split term://ksh<CR><c-k><c-j> -tnoremap <leader><Esc> <C-\><C-n> -nnoremap <leader>shs :call Shmenu("~/.scripts/", "select a script")<CR> -nnoremap <leader>sho :let file=system("cat /tmp/shmenu-out")<CR>:execute 'edit! ' . file<CR> - "Modules source ~/.config/nvim/modules/abbrs.vim source ~/.config/nvim/modules/statusline.vim