public
Created

  • Download Gist
.vimrc
VimL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
call pathogen#infect()
syntax on
filetype plugin indent on
 
set background=dark
colorscheme desert
 
set smartindent
set tabstop=2
set shiftwidth=2
set expandtab
 
 
nmap <silent> <c-n> :NERDTreeToggle<CR>
nmap <silent> f mzgg=G'z<CR
nmap <C-r> :CommandTFlush<CR>
nmap <silent> <C-t> :CommandT<CR>
let g:CommandTAcceptSelectionSplitMap=['<CR>', '<C-g>']
set wildignore+=**/tmp/**,log/**,**/uploads/**
set nolist
set nonumber
 
let g:github_token = 'dfad590151b54fc03b1c17107724a4cd'
 
inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a
 
function! s:align()
let p = '^\s*|\s.*\s|\s*$'
if exists(':Tabularize') && getline('.') =~# '^\s*|' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p)
let column = strlen(substitute(getline('.')[0:col('.')],'[^|]','','g'))
let position = strlen(matchstr(getline('.')[0:col('.')],'.*|\s*\zs.*'))
Tabularize/|/l1
normal! 0
call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))
endif
endfunction
 
augroup BgHighlight
autocmd!
autocmd WinEnter * set number
autocmd WinLeave * set nonumber
augroup END

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.