vimrc overhaul
This commit is contained in:
parent
04a5d1e557
commit
ef03188909
@ -1,4 +1,3 @@
|
|||||||
" -- Abbreviation Dictionary ------------------------- {{{
|
|
||||||
iabbrev @@ wagner.wryn@gmail.com
|
iabbrev @@ wagner.wryn@gmail.com
|
||||||
iabbrev ssig <CR>-----------------------<CR>Wryn Wagner<CR>wagner.wryn@gmail.com<CR>(720)557-5443<CR>-----------------------
|
iabbrev ssig <CR>-----------------------<CR>Wryn Wagner<CR>wagner.wryn@gmail.com<CR>(720)557-5443<CR>-----------------------
|
||||||
|
|
||||||
@ -8,11 +7,10 @@ iabbrev apap # arrange
# act
# assert
|
|||||||
iabbrev acac % arrange
% act
% assert
|
iabbrev acac % arrange
% act
% assert
|
||||||
|
|
||||||
|
|
||||||
" -- JAVA -------------------------------------------- {{{
|
" -- java -------------------------------------------- {{{
|
||||||
iabbrev psvm public static void main(String[] args) {<CR>}
|
iabbrev psvm public static void main(String[] args) {<CR>}
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" -- MARKDOWN ---------------------------------------- {{{
|
" -- markdown ---------------------------------------- {{{
|
||||||
iabbrev termdef ## Terms and Definitions<CR>Term \| Definition<CR>--- \| ---<CR>
|
iabbrev termdef ## Terms and Definitions<CR>Term \| Definition<CR>--- \| ---<CR>
|
||||||
" }}}
|
" }}}
|
||||||
" }}}
|
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
" -- VIMRC ------------------------------------------- {{{
|
|
||||||
nnoremap <Leader>ev :vsp $WRYNVIMRC<CR>
|
|
||||||
nnoremap <Leader>sv :source $MYVIMRC<CR>
|
|
||||||
nnoremap <Leader>eb :vsp $MYBASHRC<CR>
|
|
||||||
nnoremap <Leader>emb :vsp $WRYNBASH<CR>
|
|
||||||
" }}}
|
|
@ -31,7 +31,7 @@ augroup execute_file_shortcuts
|
|||||||
augroup end
|
augroup end
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" -- Miscelaneous File-specific Commands ----------------- {{{
|
" -- Miscellaneous File-specific Commands ---------------- {{{
|
||||||
augroup latex_commands
|
augroup latex_commands
|
||||||
|
|
||||||
" overwrite the <leader>t 'test' to (double) recompile the latex document.
|
" overwrite the <leader>t 'test' to (double) recompile the latex document.
|
@ -1,23 +1,21 @@
|
|||||||
set linebreak " automatically wraps text
|
|
||||||
set breakindent " indent for single-line wrap
|
|
||||||
set breakindentopt=shift:3 " indent amount for single-line wrap
|
|
||||||
|
|
||||||
set formatoptions=lj
|
set formatoptions=lj
|
||||||
" l = prevents the breaking up of words
|
|
||||||
" j = remove comment leaders when joining lines
|
|
||||||
|
|
||||||
let &t_co=256 " use 256-color
|
set number relativenumber
|
||||||
|
|
||||||
set number " show line numbers
|
set linebreak breakindent breakindentopt=shift:3
|
||||||
set relativenumber
|
set autoindent smartindent
|
||||||
|
|
||||||
set autoindent " match indentation with next line
|
set timeoutlen=200
|
||||||
set smartindent " match indentation with syntax
|
|
||||||
|
|
||||||
set spellfile=$VIM_DIR/en.utf-8.add
|
|
||||||
set spelllang=en
|
|
||||||
|
|
||||||
set showmatch " -- emit 'beep' when no matching symbol,
|
set showmatch " -- emit 'beep' when no matching symbol,
|
||||||
set matchtime=0 " -- but don't jump to it.
|
set matchtime=0 " -- but don't jump to it.
|
||||||
|
|
||||||
set timeoutlen=200 " -- short timeout for multi-key functions
|
|
||||||
|
set t_ZH=[3m t_ZR=[23m " italic start / end characters
|
||||||
|
|
||||||
|
set spellfile=$VIM_DIR/en.utf-8.add spelllang=en
|
||||||
|
|
||||||
|
set encoding=utf-8
|
||||||
|
|
||||||
|
let &t_co=256
|
||||||
|
22
vim/navigation.vim
Normal file
22
vim/navigation.vim
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
" (SHIFT + DIRECTION) for tabs
|
||||||
|
nnoremap <S-l> gt
|
||||||
|
nnoremap <S-h> gT
|
||||||
|
nnoremap <S-t> <C-w>T
|
||||||
|
|
||||||
|
" (CTRL + DIRECTION) for panes
|
||||||
|
nnoremap <C-l> <C-w>l
|
||||||
|
nnoremap <C-h> <C-w>h
|
||||||
|
nnoremap <C-j> <C-w>j
|
||||||
|
nnoremap <C-k> <C-w>k
|
||||||
|
|
||||||
|
" (CTRL + n/p) for files
|
||||||
|
nnoremap <C-n> :n<CR>
|
||||||
|
nnoremap <C-p> :N<CR>
|
||||||
|
|
||||||
|
|
||||||
|
" (<LEADER> + e + RC_PREFIX) for edit rc
|
||||||
|
nnoremap <Leader>ev :sp $WRYNVIMRC<CR>
|
||||||
|
nnoremap <Leader>sv :source $MYVIMRC<CR>
|
||||||
|
nnoremap <Leader>eb :sp $BASHRC<CR>
|
||||||
|
nnoremap <Leader>ez :sp $ZSHRC<CR>
|
93
vim/rc.vim
93
vim/rc.vim
@ -1,74 +1,73 @@
|
|||||||
" -- Environment Variables --------------------------------------- {{{
|
" set the following environment variables:
|
||||||
|
" $RC_DIR $VIM_DIR $WRYNVIMRC $BASHRC $ZSHRC $WEBBROWSER
|
||||||
source $HOME/.wryn/env/env.vim
|
source $HOME/.wryn/env/env.vim
|
||||||
"sets the following variables:
|
|
||||||
"$RC_DIR $VIM_DIR $WRYNVIMRC $WRYNBASH $MYBASHRC $WEBBROWSER
|
|
||||||
|
|
||||||
set encoding=utf-8
|
|
||||||
|
|
||||||
" set italics characters
|
|
||||||
set t_ZH=[3m
|
|
||||||
set t_ZR=[23m
|
|
||||||
|
|
||||||
let mapleader = "\\"
|
|
||||||
"let localmapleader = ','
|
|
||||||
|
|
||||||
" Load Vundle first
|
|
||||||
if isdirectory(expand("$HOME/.vim/bundle/Vundle.vim"))
|
if isdirectory(expand("$HOME/.vim/bundle/Vundle.vim"))
|
||||||
source $VIM_DIR/vundle.vim
|
source $VIM_DIR/vundle.vim
|
||||||
endif
|
endif
|
||||||
|
|
||||||
source $VIM_DIR/global_sets.vim
|
source $VIM_DIR/global_sets.vim
|
||||||
source $VIM_DIR/file_formatting.vim
|
source $VIM_DIR/formatting.vim
|
||||||
source $VIM_DIR/edit_rc.vim
|
|
||||||
source $VIM_DIR/abbreviations.vim
|
source $VIM_DIR/abbreviations.vim
|
||||||
source $VIM_DIR/window_pane_navigation.vim
|
source $VIM_DIR/navigation.vim
|
||||||
source $VIM_DIR/my_colors.vim
|
source $VIM_DIR/color.vim
|
||||||
|
|
||||||
augroup general_bindings
|
let mapleader = "\\"
|
||||||
|
"let localmapleader = ','
|
||||||
|
|
||||||
|
augroup personal_bindings
|
||||||
" {{{
|
" {{{
|
||||||
|
|
||||||
" <SPACE> to execute macro on q
|
" <SPACE> to execute macro on q
|
||||||
nnoremap <Space> @q
|
nnoremap <Space> @q
|
||||||
|
|
||||||
" Q to replace current line/selection with bash execution
|
" Q to replace current line/selection with bash execution
|
||||||
vnoremap Q !$SHELL<CR>
|
vnoremap Q !$SHELL<CR>
|
||||||
nnoremap Q !!$SHELL<CR>
|
nnoremap Q !!$SHELL<CR>
|
||||||
|
|
||||||
|
" \q for `q:`
|
||||||
|
nnoremap <Leader>q q:
|
||||||
|
|
||||||
|
" \s previous selection command
|
||||||
|
nnoremap <Leader>s :'<,'>
|
||||||
|
|
||||||
|
" \f for fold
|
||||||
|
nnoremap <Leader>f z
|
||||||
|
nnoremap <Leader>f z
|
||||||
|
|
||||||
|
" \j for J, but append current line to the line below
|
||||||
|
nnoremap <Leader>j ddpkJ
|
||||||
|
|
||||||
|
" move the current line one below where it is
|
||||||
|
nnoremap - :m +1 <CR>
|
||||||
|
nnoremap _ :m -2 <CR>
|
||||||
|
|
||||||
|
" \t for rerun last 'test' command:
|
||||||
|
nnoremap <Leader>t q:?test<CR><CR>
|
||||||
|
|
||||||
|
" \b for git blame
|
||||||
|
nnoremap <Leader>b :set termwinsize=15*0<BAR>:execute "terminal git blame -L " .eval(line(".")-5) . ",+10 %"<BAR>:set termwinsize&<CR>
|
||||||
|
|
||||||
" \d to insert formatted date before/after cursor
|
" \d to insert formatted date before/after cursor
|
||||||
nnoremap <Leader>di :let @d = system("date '+%A, %B %-d, %Y'")<CR>i<C-r>d<BS> <esc>
|
nnoremap <Leader>di :let @d = system("date '+%A, %B %-d, %Y'")<CR>i<C-r>d<BS> <esc>
|
||||||
nnoremap <Leader>da :let @d = system("date '+%A, %B %-d, %Y'")<CR>a <C-r>d<BS><esc>
|
nnoremap <Leader>da :let @d = system("date '+%A, %B %-d, %Y'")<CR>a <C-r>d<BS><esc>
|
||||||
|
|
||||||
|
" - toggle casing for current word
|
||||||
|
inoremap <C-u> <esc>viw~ea
|
||||||
|
|
||||||
" \c \v to copy/paste from xclip
|
" \c \v to copy/paste from xclip
|
||||||
" @TODO: learn how to freaking compile vim with x11 compatibility so these
|
" @TODO: learn how to freaking compile vim with x11 compatibility so these
|
||||||
" aren't necessary :)
|
" aren't necessary :)
|
||||||
vnoremap <Leader>c :w !xclip<CR><CR>
|
vnoremap <Leader>c :w !xclip<CR><CR>
|
||||||
nnoremap <Leader>v o<esc>!!xclip -o<CR>
|
nnoremap <Leader>v o<esc>!!xclip -o<CR>
|
||||||
|
|
||||||
" \b for git blame
|
|
||||||
nnoremap <Leader>b :set termwinsize=15*0<BAR>:execute "terminal git blame -L " .eval(line(".")-5) . ",+10 %"<BAR>:set termwinsize&<CR>
|
|
||||||
|
|
||||||
" \s previous selection command
|
|
||||||
nnoremap <Leader>sq :'<,'>
|
|
||||||
nnoremap <Leader>sc :'<,'>w !xclip<CR><CR>
|
nnoremap <Leader>sc :'<,'>w !xclip<CR><CR>
|
||||||
|
|
||||||
" \q for `q:`
|
" ------- available / rarely used bindings -------
|
||||||
nnoremap <Leader>q q:
|
|
||||||
|
" nnoremap <BS>
|
||||||
" \t for rerun last 'test' command:
|
" nnoremap <C-t>
|
||||||
nnoremap <Leader>t q:?test<CR><CR>
|
" nnoremap <C-b>
|
||||||
|
" nnoremap z
|
||||||
" \f for fold
|
" nnoremap ^
|
||||||
nnoremap <Leader>f z
|
|
||||||
nnoremap <Leader>f z
|
|
||||||
|
|
||||||
" append current line to the line below
|
|
||||||
nnoremap <Leader>j ddpkJ
|
|
||||||
|
|
||||||
" - to move the current line one below where it is
|
|
||||||
nnoremap - :m +1 <CR>
|
|
||||||
nnoremap _ :m -2 <CR>
|
|
||||||
|
|
||||||
" - (insert mode) set current word to upper-case
|
|
||||||
inoremap <c-u> <esc>viwUea
|
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
augroup end
|
augroup end
|
||||||
|
@ -8,28 +8,31 @@ set rtp+=~/.vim/bundle/Vundle.vim
|
|||||||
call vundle#begin()
|
call vundle#begin()
|
||||||
|
|
||||||
Plugin 'VundleVim/Vundle.vim'
|
Plugin 'VundleVim/Vundle.vim'
|
||||||
|
|
||||||
" <======================================================>
|
" <======================================================>
|
||||||
" <==== Insert plugins here =============================>
|
" <==== Insert plugins here =============================>
|
||||||
|
|
||||||
" tpope/surround
|
" tpope/surround
|
||||||
Plugin 'tpope/vim-surround'
|
Plugin 'tpope/vim-surround'
|
||||||
|
|
||||||
" nerdtree
|
" nerdtree
|
||||||
Plugin 'git://github.com/scrooloose/nerdtree.git'
|
Plugin 'git://github.com/scrooloose/nerdtree.git'
|
||||||
|
|
||||||
" youCompleteMe
|
" youCompleteMe
|
||||||
Plugin 'git://github.com/Valloric/YouCompleteMe.git'
|
Plugin 'git://github.com/Valloric/YouCompleteMe.git'
|
||||||
|
|
||||||
" omnisharp (c#)
|
" omnisharp (c#)
|
||||||
Plugin 'OmniSharp/omnisharp-vim'
|
Plugin 'OmniSharp/omnisharp-vim'
|
||||||
|
|
||||||
" ale -- asynchronus error checking
|
" ale -- asynchronus error checking
|
||||||
Plugin 'https://github.com/w0rp/ale'
|
Plugin 'https://github.com/w0rp/ale'
|
||||||
|
|
||||||
|
" <======================================================>
|
||||||
" <======================================================>
|
" <======================================================>
|
||||||
call vundle#end()
|
call vundle#end()
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
" To ignore plugin indent changes, instead use:
|
" To ignore plugin indent changes, instead use:
|
||||||
" filetype plugin on
|
" filetype plugin on
|
||||||
|
|
||||||
" Brief help
|
|
||||||
" :PluginList - lists configured plugins
|
" :PluginList - lists configured plugins
|
||||||
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
|
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
|
||||||
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
|
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
|
||||||
@ -37,15 +40,17 @@ filetype plugin indent on
|
|||||||
|
|
||||||
" see :h vundle for more details or wiki for FAQ
|
" see :h vundle for more details or wiki for FAQ
|
||||||
|
|
||||||
|
|
||||||
" ===================================================================================
|
" ===================================================================================
|
||||||
" === PLUGIN-SPECIFIC SETTINGS ======================================================
|
" === PLUGIN-SPECIFIC SETTINGS ======================================================
|
||||||
" ===================================================================================
|
" ===================================================================================
|
||||||
|
|
||||||
" --- Nerd Tree ---
|
" --- Nerd Tree ---------------------------------------------------------------------
|
||||||
map <C-o> :NERDTreeToggle %<CR>
|
map <C-o> :NERDTreeToggle %<CR>
|
||||||
let g:NERDTreeNodeDelimiter = "\u00a0" " -- Was seeing ^G character, and this should fix that
|
let g:NERDTreeNodeDelimiter = "\u00a0" " -- Was seeing ^G character, and this should fix that
|
||||||
|
|
||||||
" --- YouCompleteMe (YCM) ---
|
|
||||||
|
" --- YouCompleteMe -----------------------------------------------------------------
|
||||||
function! ToggleYCM()
|
function! ToggleYCM()
|
||||||
if g:ycm_auto_trigger
|
if g:ycm_auto_trigger
|
||||||
let g:ycm_auto_trigger = 0
|
let g:ycm_auto_trigger = 0
|
||||||
@ -58,12 +63,14 @@ endfunction
|
|||||||
|
|
||||||
let g:ycm_goto_buffer_command = 'new-tab'
|
let g:ycm_goto_buffer_command = 'new-tab'
|
||||||
|
|
||||||
nnoremap <C-p> :call ToggleYCM()<CR>
|
nnoremap <S-y> :call ToggleYCM()<CR>
|
||||||
nnoremap gd :YcmCompleter GoToDefinition<CR>
|
nnoremap gd :YcmCompleter GoToDefinition<CR>
|
||||||
|
|
||||||
" STARTS DEACTIVATED
|
" STARTS DEACTIVATED
|
||||||
" let g:ycm_auto_trigger=0
|
" let g:ycm_auto_trigger=0
|
||||||
|
|
||||||
" --- ALE ---
|
|
||||||
|
" --- ALE ---------------------------------------------------------------------------
|
||||||
let g:ale_linters = {
|
let g:ale_linters = {
|
||||||
\ 'cs' : ['OmniSharp'],
|
\ 'cs' : ['OmniSharp'],
|
||||||
\ 'python' : ['pylint']
|
\ 'python' : ['pylint']
|
||||||
@ -73,6 +80,3 @@ let g:ale_lint_on_insert_leave = 'never'
|
|||||||
|
|
||||||
nnoremap <Leader>ae :ALENext<cr>
|
nnoremap <Leader>ae :ALENext<cr>
|
||||||
nnoremap <Leader>ar :ALEPrevious<cr>
|
nnoremap <Leader>ar :ALEPrevious<cr>
|
||||||
|
|
||||||
" --- command t ---
|
|
||||||
nnoremap T :CommandT<cr>
|
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
" -- Pane/Window Navigation -------------------------- {{{
|
|
||||||
" (SHIFT + DIRECTION) for tabs
|
|
||||||
nnoremap <S-l> gt
|
|
||||||
nnoremap <S-h> gT
|
|
||||||
|
|
||||||
" (CTRL + DIRECTION) for panes
|
|
||||||
nnoremap <C-l> <C-w>l
|
|
||||||
nnoremap <C-h> <C-w>h
|
|
||||||
nnoremap <C-j> <C-w>j
|
|
||||||
nnoremap <C-k> <C-w>k
|
|
||||||
|
|
||||||
" (CTRL + n) for files
|
|
||||||
nnoremap <C-n> :n<CR>
|
|
||||||
nnoremap <C-b> :N<CR>
|
|
||||||
" }}}
|
|
Loading…
Reference in New Issue
Block a user