Created
May 22, 2014 12:59
-
-
Save stenver/6c54f68ad29ea97055cf to your computer and use it in GitHub Desktop.
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
syntax enable " Turn on syntax highlighting. | |
" pathogen.vim | |
runtime macros/matchit.vim " Load the matchit plugin. | |
set showcmd " Display incomplete commands. | |
set showmode " Display the mode you're in. | |
set backspace=indent,eol,start " Intuitive backspacing. | |
set hidden " Handle multiple buffers better. | |
set wildmenu " Enhanced command line completion. | |
set wildmode=list:longest " Complete files like a shell. | |
set ignorecase " Case-insensitive searching. | |
set smartcase " But case-sensitive if expression contains a capital letter. | |
set number " Show line numbers. | |
set ruler " Show cursor position. | |
set incsearch " Highlight matches as you type. | |
set hlsearch " Highlight matches. | |
set wrap " Turn on line wrapping. | |
set scrolloff=3 " Show 3 lines of context around the cursor. | |
set title " Set the terminal's title | |
set visualbell " No beeping. | |
set nobackup " Don't make a backup before overwriting a file. | |
set nowritebackup " And again. | |
set directory=$HOME/.vim/tmp//,. " Keep swap files in one location | |
" UNCOMMENT TO USE | |
set tabstop=2 " Global tab width. | |
set shiftwidth=2 " And again, related. | |
set expandtab " Use spaces instead of tabs | |
set laststatus=2 " Show the status line all the time | |
" Useful status information at bottom of screen | |
set statusline=[%n]\ %<%.99f\ %h%w%m%r%y\ %{exists('*CapsLockStatusline')?CapsLockStatusline():''}%=%-16(\ %l,%c-%v\ %)%P | |
" Or use vividchalk | |
colorscheme delek | |
" Tab mappings. | |
map <leader>tt :tabnew<cr> | |
map <leader>te :tabedit | |
map <leader>tc :tabclose<cr> | |
map <leader>to :tabonly<cr> | |
map <leader>tn :tabnext<cr> | |
map <leader>tp :tabprevious<cr> | |
map <leader>tf :tabfirst<cr> | |
map <leader>tl :tablast<cr> | |
map <leader>tm :tabmove | |
" Remove trailing whitepsace | |
autocmd BufWritePre *.py :%s/\s\+$//e | |
autocmd BufWritePre *.js :%s/\s\+$//e | |
autocmd BufWritePre *.html :%s/\s\+$//e | |
" Ignore E501 (line too long) from pep8 | |
let g:syntastic_python_flake8_post_args='--ignore=E501,F812' | |
let g:syntastic_mode_map = { 'mode': 'active', 'active_filetypes': ['python', 'javascript']} | |
" controversial...swap colon and semicolon for easier commands | |
"nnoremap ; : | |
"nnoremap : ; | |
"vnoremap ; : | |
"vnoremap : ; | |
" automatic fold settings for specific files. uncomment to use. | |
" autocmd filetype ruby setlocal foldmethod=syntax | |
" autocmd FileType css setlocal foldmethod=indent shiftwidth=2 tabstop=2 | |
" Make it possible to navigate autocomplete list with j and k | |
inoremap <expr> j ((pumvisible())?("\<C-n>"):("j")) | |
inoremap <expr> k ((pumvisible())?("\<C-p>"):("k")) | |
set noswapfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment