Skip to content

Instantly share code, notes, and snippets.

@richardj
Last active November 4, 2015 11:00
Show Gist options
  • Save richardj/e6f638bb79676f4a3ae5 to your computer and use it in GitHub Desktop.
Save richardj/e6f638bb79676f4a3ae5 to your computer and use it in GitHub Desktop.
.vimrc
execute pathogen#infect()
" set tabs to 2 spaces"
set smartindent
set expandtab
set tabstop=2
set shiftwidth=2
" set linenumbering
set number
set numberwidth=5
syntax on
set nowrap
" highlight search results
set hlsearch
set showcmd " display incomplete commands "
set laststatus=2 " always display the status line "
" filename and file information
set statusline=%t "tail of the filename
" :set statusline+=[%{strlen(&fenc)?&fenc:'none'}, "file encoding
set statusline+=%{&ff}] "file format
set statusline+=%h "help file flag
set statusline+=%m "modified flag
set statusline+=%r "read only flag
set statusline+=%y "filetype
set statusline+=%= "left/right separator
set statusline+=%c, "cursor column
set statusline+=%l/%L "cursor line/total lines
set statusline+=\ %P "percent through file
" remap tab keys "
map tn :tabnext<CR>
map tp :tabprevious<CR>
noremap :te :tabedit
" move faster with hjkl "
nmap J 5j
nmap K 5k
xmap J 5j
xmap K 5k
" move even faster with hjkl
xmap <C-j> 50j
" format json
nmap =j :%!python -m json.tool<CR>
" add support for twig through jinja.vim and htmljinja.vim "
au BufRead,BufNewFile *.twig set filetype=htmljinja
" split treating "
set splitbelow
set splitright
"##############################################################################
" Easier split navigation
"##############################################################################
" Use ctrl-[hjkl] to select the active split!
nmap <silent> <c-k> :wincmd k<CR>
nmap <silent> <c-j> :wincmd j<CR>
nmap <silent> <c-h> :wincmd h<CR>
nmap <silent> <c-l> :wincmd l<CR>
let g:molokai_original = 1
" let g:rehash256 = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment