mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-26 06:05:37 +00:00
more vim customizations
This commit is contained in:
parent
449d4ec673
commit
9034b58c1f
@ -75,11 +75,28 @@ nnoremap <Leader>gp :Git push<cr>
|
|||||||
nnoremap <silent> <Leader>gr :!gh repo view -w<cr><cr>
|
nnoremap <silent> <Leader>gr :!gh repo view -w<cr><cr>
|
||||||
|
|
||||||
" Split window
|
" Split window
|
||||||
nnoremap <Leader>ws :vsplit<cr>
|
nnoremap <Leader>wv :vsplit<cr>
|
||||||
|
nnoremap <Leader>wh :split<cr>
|
||||||
|
|
||||||
" Close all other splits
|
" Close all other splits
|
||||||
nnoremap <Leader>wm :only<cr>
|
nnoremap <Leader>wm :only<cr>
|
||||||
|
|
||||||
|
" Zoom / Restore window.
|
||||||
|
" https://stackoverflow.com/a/26551079
|
||||||
|
function! s:ZoomToggle() abort
|
||||||
|
if exists('t:zoomed') && t:zoomed
|
||||||
|
execute t:zoom_winrestcmd
|
||||||
|
let t:zoomed = 0
|
||||||
|
else
|
||||||
|
let t:zoom_winrestcmd = winrestcmd()
|
||||||
|
resize
|
||||||
|
vertical resize
|
||||||
|
let t:zoomed = 1
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
command! ZoomToggle call s:ZoomToggle()
|
||||||
|
nnoremap <silent> <leader>z :ZoomToggle<CR>
|
||||||
|
|
||||||
" Exit terminal mode (requires Alacritty escape)
|
" Exit terminal mode (requires Alacritty escape)
|
||||||
tnoremap <S-CR> <C-\><C-n>
|
tnoremap <S-CR> <C-\><C-n>
|
||||||
|
|
||||||
@ -91,9 +108,9 @@ nnoremap <Leader>rp :Refresh<cr> :PlugInstall<cr>
|
|||||||
noremap <silent> <Leader>ft :Fern . -drawer -width=35 -toggle<CR><C-w>=
|
noremap <silent> <Leader>ft :Fern . -drawer -width=35 -toggle<CR><C-w>=
|
||||||
|
|
||||||
" Tabularize
|
" Tabularize
|
||||||
nnoremap <Leader>ta :Tabularize /
|
noremap <Leader>ta :Tabularize /
|
||||||
nnoremap <Leader>t# :Tabularize /#<CR>
|
noremap <Leader>t# :Tabularize /#<CR>
|
||||||
nnoremap <Leader>t" :Tabularize /"<CR>
|
noremap <Leader>t" :Tabularize /"<CR>
|
||||||
|
|
||||||
" Read todo comments
|
" Read todo comments
|
||||||
nnoremap <Leader>td /# \?TODO:\?<CR>
|
nnoremap <Leader>td /# \?TODO:\?<CR>
|
||||||
|
@ -29,6 +29,7 @@ Plug 'airblade/vim-rooter' " Change directory to git route
|
|||||||
Plug 'tpope/vim-fugitive' " Other git commands
|
Plug 'tpope/vim-fugitive' " Other git commands
|
||||||
Plug 'machakann/vim-highlightedyank' " Highlight text when copied
|
Plug 'machakann/vim-highlightedyank' " Highlight text when copied
|
||||||
Plug 'itchyny/lightline.vim' " Status bar
|
Plug 'itchyny/lightline.vim' " Status bar
|
||||||
|
Plug 'tpope/vim-eunuch' " File manipulation in Vim
|
||||||
Plug 'tpope/vim-vinegar' " Fixes netrw file explorer
|
Plug 'tpope/vim-vinegar' " Fixes netrw file explorer
|
||||||
Plug 'lambdalisue/fern.vim' " File explorer / project drawer
|
Plug 'lambdalisue/fern.vim' " File explorer / project drawer
|
||||||
Plug 'christoomey/vim-tmux-navigator' " Hotkeys for tmux panes
|
Plug 'christoomey/vim-tmux-navigator' " Hotkeys for tmux panes
|
||||||
|
@ -17,3 +17,4 @@ let g:vimwiki_key_mappings =
|
|||||||
let g:vimwiki_auto_chdir = 1 " Set local dir to Wiki when open
|
let g:vimwiki_auto_chdir = 1 " Set local dir to Wiki when open
|
||||||
let g:vimwiki_create_link = 0 " Don't automatically create new links
|
let g:vimwiki_create_link = 0 " Don't automatically create new links
|
||||||
let g:vimwiki_listsyms = ' x' " Set checkbox symbol progression
|
let g:vimwiki_listsyms = ' x' " Set checkbox symbol progression
|
||||||
|
let g:vimwiki_table_mappings = 0 " VimWiki table keybinds interfere with tab completion
|
||||||
|
Loading…
Reference in New Issue
Block a user