diff options
-rw-r--r-- | vim.dot.link/plugin/auto_file.vim | 25 | ||||
-rw-r--r-- | vim.dot.link/plugin/ui.vim | 38 | ||||
-rw-r--r-- | vimrc.dot.link | 58 |
3 files changed, 63 insertions, 58 deletions
diff --git a/vim.dot.link/plugin/auto_file.vim b/vim.dot.link/plugin/auto_file.vim new file mode 100644 index 0000000..dc19ad3 --- /dev/null +++ b/vim.dot.link/plugin/auto_file.vim @@ -0,0 +1,25 @@ +" auto_file.vim - Automatically file reading, saving; directory changer. + +" Autoread +" +" http://vim.wikia.com/wiki/Have_Vim_check_automatically_if_the_file_has_changed_externally +" http://stackoverflow.com/questions/2490227/how-does-vims-autoread-work +" http://stackoverflow.com/questions/2490227/how-does-vims-autoread-work +"au FocusGained,BufEnter * :silent! ! +"au FocusLost,WinLeave * :silent! w + +" Autosave +" See https://github.com/vim-scripts/vim-auto-save +"let g:auto_save = 1 + +" Auto change dir +" +" Automatically set the current working directory to the current buffer file's +" directory +" +" See http://vim.wikia.com/wiki/Set_working_directory_to_the_current_file +"set autochdir +augroup changedir + autocmd! + autocmd BufEnter * silent! lcd %:p:h +augroup END diff --git a/vim.dot.link/plugin/ui.vim b/vim.dot.link/plugin/ui.vim new file mode 100644 index 0000000..631d493 --- /dev/null +++ b/vim.dot.link/plugin/ui.vim @@ -0,0 +1,38 @@ +" ui.vim - UI customization +" +" Author: Silvio Rhatto <rhatto@riseup.net> + +" Status and tab lines +set laststatus=2 " Always display the statusline in all windows +set showtabline=2 " Always display the tabline, even if there is only one tab +set noshowmode " Hide the default mode text (e.g. -- INSERT -- below the statusline) + +" Powerline +"python from powerline.vim import setup as powerline_setup +"python powerline_setup() +"python del powerline_setup +" + +" Airline +if $WINDOWID != "" + let g:airline_powerline_fonts=1 + let g:airline#extensions#tabline#enabled=1 +else + let g:loaded_airline = 1 +endif + +" Color scheme +"colorscheme github +"colorscheme solarized +"colorscheme gentooish +"colorscheme revolutions +"colorscheme two2tango +"colorscheme vj +"colorscheme wood +"colorscheme zenburn +"colorscheme inkpot +if $WINDOWID != "" + colorscheme xoria256 +else + colorscheme zenburn +endif diff --git a/vimrc.dot.link b/vimrc.dot.link index b179acc..ffa4246 100644 --- a/vimrc.dot.link +++ b/vimrc.dot.link @@ -61,64 +61,6 @@ set wildmenu set nomodeline set modelines=0 -" Color scheme -"colorscheme github -"colorscheme solarized -"colorscheme gentooish -"colorscheme revolutions -"colorscheme two2tango -"colorscheme vj -"colorscheme wood -"colorscheme zenburn -"colorscheme inkpot -if $WINDOWID != "" - colorscheme xoria256 -else - colorscheme zenburn -endif - -" Status and tab lines -set laststatus=2 " Always display the statusline in all windows -set showtabline=2 " Always display the tabline, even if there is only one tab -set noshowmode " Hide the default mode text (e.g. -- INSERT -- below the statusline) - -" Airline -if $WINDOWID != "" - let g:airline_powerline_fonts=1 - let g:airline#extensions#tabline#enabled=1 -else - let g:loaded_airline = 1 -endif - -" Powerline -"python from powerline.vim import setup as powerline_setup -"python powerline_setup() -"python del powerline_setup - -" Autoread -" -" http://vim.wikia.com/wiki/Have_Vim_check_automatically_if_the_file_has_changed_externally -" http://stackoverflow.com/questions/2490227/how-does-vims-autoread-work -" http://stackoverflow.com/questions/2490227/how-does-vims-autoread-work -"au FocusGained,BufEnter * :silent! ! -"au FocusLost,WinLeave * :silent! w - -" Autosave -" See https://github.com/vim-scripts/vim-auto-save -"let g:auto_save = 1 - -" Auto change dir -" -" Automatically set the current working directory to the current buffer file's -" directory -" -" See http://vim.wikia.com/wiki/Set_working_directory_to_the_current_file -"set autochdir -augroup changedir - autocmd! - autocmd BufEnter * silent! lcd %:p:h -augroup END - " Session management " " http://usevim.com/2013/07/05/sessions/ |