]> git.rmz.io Git - dotfiles.git/blobdiff - vim/vimrc
nvim: import autocmds from LazyVim
[dotfiles.git] / vim / vimrc
index c4872527f4691c5e846c6ef6959f9d3704910044..d92ec16041e94bf344717a7c951de10c2cc6849c 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -1,14 +1,14 @@
+" force python3
+if has('python3') | endif
+
+" space is leader
+let g:mapleader = " "
+
 " runtimepath {{{1
 set runtimepath ^=$XDG_CONFIG_HOME/vim
 set runtimepath +=$XDG_CONFIG_HOME/vim/after
 
 " runtimepath {{{1
 set runtimepath ^=$XDG_CONFIG_HOME/vim
 set runtimepath +=$XDG_CONFIG_HOME/vim/after
 
-" force python3
-if has('python3') | endif
-
 " plugins {{{1
 " plugins {{{1
-" remove all autocommands
-autocmd!
-
 call plug#begin('$XDG_DATA_HOME/vim')
 " This does not update vim-plug, use PlugUpgrade instead
 Plug 'junegunn/vim-plug'
 call plug#begin('$XDG_DATA_HOME/vim')
 " This does not update vim-plug, use PlugUpgrade instead
 Plug 'junegunn/vim-plug'
@@ -376,9 +376,9 @@ set sessionoptions+=unix,slash  " damn windows and it's silly ways
 
 " autocmds {{{1
 " Resize splits when the window is resized {{{2
 
 " autocmds {{{1
 " Resize splits when the window is resized {{{2
-augroup resize
+augroup resize_splits
     au!
     au!
-    autocmd VimResized * :wincmd =
+    autocmd VimResized * :tabdo wincmd =
 augroup END
 
 " Only show cursorline in the current window and in normal mode {{{2
 augroup END
 
 " Only show cursorline in the current window and in normal mode {{{2
@@ -395,7 +395,7 @@ augroup ft_stdin
 augroup END
 
 " Jump to last known cursor position {{{2
 augroup END
 
 " Jump to last known cursor position {{{2
-augroup cursor_pos
+augroup last_loc
     au!
     " blacklist certain filetype
     let blacklist = ['gitcommit']
     au!
     " blacklist certain filetype
     let blacklist = ['gitcommit']
@@ -425,9 +425,6 @@ command! ToggleAutoChecktime let b:autochecktime=!get(b:, 'autochecktime', 0) |
 
 " bindings {{{1
 
 
 " bindings {{{1
 
-" allow both <space> and \ to be <leader>
-map <space> <leader>
-
 " make
 function! MakeWithOpt()
   " TODO only do this if makeprg matches make
 " make
 function! MakeWithOpt()
   " TODO only do this if makeprg matches make