Created
March 21, 2013 20:23
-
-
Save letsgetrandy/5216380 to your computer and use it in GitHub Desktop.
My .vimrc file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filetype plugin on | |
filetype indent on | |
set ruler | |
set noerrorbells | |
set showmatch | |
set autoread | |
set ignorecase | |
set smartcase | |
set colorcolumn=80 | |
syntax enable | |
set gfn=Menlo:h14 | |
set shell=/bin/bash | |
set encoding=utf8 | |
try | |
lang en_US | |
catch | |
endtry | |
set ffs=unix,dos,mac | |
set nobackup | |
set noswapfile | |
try | |
set undodir=~/.vim_runtime/undodir | |
set undofile | |
catch | |
endtry | |
set shiftwidth=4 | |
set tabstop=4 | |
set smarttab | |
"set autoindent | |
"set smartindent | |
"set foldnestmax=1 | |
set expandtab | |
set wrap | |
set linebreak | |
set textwidth=0 | |
set wildignore+=*.pyc,*.rst,venv,migrations,*.jpg,*.png,*.gif | |
highlight ExtraWhitespace ctermbg=red guibg=red | |
" Show trailing whitespace: | |
match ExtraWhitespace /\s\+$/ | |
" Show trailing whitespace and spaces before a tab: | |
"match ExtraWhitespace /\s\+$\| \+\ze\t/ | |
" Show tabs that are not at the start of a line: | |
"match ExtraWhitespace /[^\t]\zs\t\+/ | |
" Show spaces used for indenting (so you use only tabs for indenting). | |
"match ExtraWhitespace /^\t*\zs \+/ | |
" Switch off :match highlighting. | |
"match | |
" retab on save | |
autocmd BufWritePre * :retab | |
"""""""""""""""""""""""""""""" | |
" => Python section | |
"""""""""""""""""""""""""""""" | |
"let python_highlight_all = 1 | |
"au FileType python syn keyword pythonDecorator True None False self | |
" | |
"au BufNewFile,BufRead *.jinja set syntax=htmljinja | |
"au BufNewFile,BufRead *.mako set ft=mako | |
" | |
"au FileType python inoremap <buffer> $r return | |
"au FileType python inoremap <buffer> $i import | |
"au FileType python inoremap <buffer> $p print | |
"au FileType python inoremap <buffer> $f #--- PH ----------------------------------------------<esc>FP2xi | |
"au FileType python map <buffer> <leader>1 /class | |
"au FileType python map <buffer> <leader>2 /def | |
"au FileType python map <buffer> <leader>C ?class | |
"au FileType python map <buffer> <leader>D ?def | |
au FileType python map tt :!fab run_aft:%<enter> | |
au FileType python map tp :!fab test:%,nocapture<enter> | |
au FileType python map tk :!kivy %<enter> | |
let g:pymode_lint_mccabe_complexity = 10 | |
let g:pymode_lint_cwindow = 0 | |
let g:pymode_folding = 0 | |
"""""""""""""""""""""""""""""" | |
"=> JavaScript section | |
""""""""""""""""""""""""""""""" | |
"au FileType javascript call JavaScriptFold() | |
"au FileType javascript syn region myFold start="{" end="}" transparent fold | |
"au FileType javascript syn sync fromstart | |
"au FileType javascript setl foldmarker={,} | |
"au FileType javascript setl foldmethod=indent | |
"au FileType javascript setl foldlevel=0 | |
"au FileType javascript setl foldnestmax=1 | |
"au FileType javascript setl fen | |
"au FileType javascript setl nocindent | |
au FileType javascript imap <c-t> AJS.log();<esc>hi | |
au FileType javascript imap <c-a> alert();<esc>hi | |
au FileType javascript inoremap <buffer> $r return | |
au FileType javascript inoremap <buffer> $f //--- PH ----------------------------------------------<esc>FP2xi | |
"function! JavaScriptFold() | |
" setl foldmethod=syntax | |
" setl foldlevelstart=1 | |
" syn region foldBraces start=/{/ end=/}/ transparent fold keepend extend | |
" | |
" function! FoldText() | |
" return substitute(getline(v:foldstart), '{.*', '{...}', '') | |
" endfunction | |
" setl foldtext=FoldText() | |
"endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment