From 132ec769505533c24bd06f6604913fdc1db6fe35 Mon Sep 17 00:00:00 2001 From: Vikas Kushwaha Date: Sun, 1 Jun 2025 20:48:49 +0530 Subject: git updates --- .config/nvim/init.vim | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) (limited to '.config/nvim') diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index eeedeae..67eb5b8 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -32,7 +32,7 @@ if filereadable(config_dir . "autoload/plug.vim") call plug#end() endif -packadd fzf.vim +packadd! fzf.vim source ~/.config/nvim/user/fzf.vim set rtp+=/usr/share/vim/vimfiles @@ -58,7 +58,6 @@ highlight ColorColumn ctermbg=238 highlight! link CursorColumn ColorColumn highlight FloatermBorder guibg=orange guifg=cyan autocmd FileType text,fstab setlocal tabstop=8 shiftwidth=8 -autocmd FileType html setlocal tabstop=2 shiftwidth=2 list nolinebreak autocmd FileType sql setlocal commentstring=--\ %s autocmd BufWritePre * %s/\s\+$//e autocmd BufEnter bm-files,bm-dirs setlocal tabstop=8 shiftwidth=8 @@ -123,7 +122,10 @@ endfunction autocmd BufNewFile * call SourceTemplate() autocmd TermOpen * startinsert -command! -nargs=* T split | terminal +command! -nargs=* TermSplit split | terminal +command! -nargs=* TermVSplit vsplit | terminal + +command! -nargs=* T tabnew " --> Bindings and configs @@ -147,7 +149,7 @@ vnoremap "*d :let @+=@* noremap "+p noremap "+P -nnoremap c "_c +nnoremap c "cc inoremap jk " map ;n /<++>c4l inoremap ;n /<++>c4l @@ -155,8 +157,9 @@ nnoremap n /<++>c4l augroup Web autocmd! - autocmd FileType html,javascript call SetWebBindings() - function SetWebBindings() + autocmd FileType html,javascript call SetWebOptions() + function SetWebOptions() + setlocal tabstop=2 shiftwidth=2 list nolinebreak inoremap ;s >bi<ea inoremap ;c >biea inoremap ;i b"tywi<ea>PFb"tywi\begin{ea}\end{"tpa}kA inoremap ;s \section{}i inoremap ;at \begin{tikzpicture}\end{tikzpicture}O @@ -197,25 +200,25 @@ nnoremap ft :w:!dev test "%" nnoremap fb :w:!dev build "%" nnoremap fr :w:!dev clean "%" -nnoremap Fl :w:T dev lint "%" -nnoremap Fm :w:T dev format "%" -nnoremap Fc :w:T dev compile "%" -nnoremap Fe :w:T dev run "%" -nnoremap Ft :w:T dev test "%" -nnoremap Fr :w:T dev clean "%" +nnoremap Fl :w:TermSplit dev lint "%" +nnoremap Fm :w:TermSplit dev format "%" +nnoremap Fc :w:TermSplit dev compile "%" +nnoremap Fe :w:TermSplit dev run "%" +nnoremap Ft :w:TermSplit dev test "%" +nnoremap Fr :w:TermSplit dev clean "%" nnoremap b :w:se nornu:!dev build "%":se rnu -nnoremap B :w:se nornu:T dev build "%" +nnoremap B :w:se nornu:TermSplit dev build "%" nnoremap t :w:se nornu:!dev test "%":se rnu -nnoremap T :w:se nornu:T dev test "%" +nnoremap T :w:se nornu:TermSplit dev test "%" nnoremap w :set wrap! nnoremap fo :!opout "%:p" nnoremap :source ~/.config/nvim/init.vim nnoremap s :%s//gc -nnoremap gc :T git add --all && git commit -nnoremap gp :T gitpush +nnoremap gc :TermSplit git add --all && git commit +nnoremap gp :TermSplit gitpush let shortcuts = config_dir . "shortcuts.vim" if filereadable(shortcuts) -- cgit v1.2.3