Skip to content

Instantly share code, notes, and snippets.

@nabucosound
Last active December 9, 2015 22:18
Show Gist options
  • Save nabucosound/4336550 to your computer and use it in GitHub Desktop.
Save nabucosound/4336550 to your computer and use it in GitHub Desktop.
" Pathogen load
filetype off
call pathogen#infect()
call pathogen#helptags()
filetype plugin on
" No Vi Compatibility
set nocompatible
" Syntax highlight
syntax enable
set background=dark
let python_highlight_all=1
highlight SpellBad term=reverse ctermbg=1
" Set <leader> to ','
let mapleader=","
" Default Indentation
filetype indent on
set smarttab
set expandtab
set tabstop=4 " A tab is four spaces
set softtabstop=4
set shiftwidth=4 " Number of spaces to use for autoindenting
set autoindent " Always set autoindenting on
set smartindent
" set foldmethod=indent
" Status line
set laststatus=2
set statusline=%t\ %y\ format:\ %{&ff};\ [%l,%c]\ %m
" Left/Right arrow keys change buffers in all modes
noremap <Left> <Esc>:bp<CR>
inoremap <Left> <Esc>:bp<CR>
nnoremap <Left> <Esc>:bp<CR>
vnoremap <Left> <Esc>:bp<CR>
noremap <Right> <Esc>:bn<CR>
inoremap <Right> <Esc>:bn<CR>
nnoremap <Right> <Esc>:bn<CR>
vnoremap <Right> <Esc>:bn<CR>
" Enable hidden buffers so Vim does not prompt for unsaved changes
" when switching to another new or existing buffer
set hidden
" From https://github.com/robhudson/snipmate_for_django/
" set cursorline " Highlight current line
set nostartofline " Do no reposition cursor to begining of line while switching buffers
" Search
set incsearch " Highlight search terms
set hlsearch " Show search matches as you type
" Use leader + space to clear highlithg
nnoremap <leader><space> :nohlsearch<cr>
" Load proper syntax for certain filetypes
autocmd BufNewFile,BufRead *.html set ft=htmldjango
autocmd BufNewFile,BufRead *.md set ft=markdown
" autocmd BufNewFile,BufRead *.less set ft=css
" From http://nvie.com/posts/how-i-boosted-my-vim/
set history=1000 " Remember more commands and search history
set undolevels=1000 " Use many muchos levels of undo
set wildignore=*.swp,*.pyc,*.png,*.jpg,*.jpeg,*.gif,*.pdf,migrations,node_modules " Ignored folders and file types
set title " Change the terminal's title
set visualbell " Don't beep
set noerrorbells " Don't beep
set t_Co=256 " Use 256 colors
" Do not jump 'over' next code line on a wrapped line, but go to next line in
" editor (useful for long wrapped lines where you previously had to move
" horizontally the cursor over the line until the desired place)
nnoremap j gj
nnoremap k gk
" Syntastic
let g:syntastic_check_on_open=1
let g:syntastic_python_checkers = ['flake8']
" " http://flake8.readthedocs.org/en/latest/warnings.html#error-codes
let g:syntastic_python_flake8_args='--ignore=E501,F403'
let syntastic_mode_map = { 'passive_filetypes': ['html'] }
" vim-airline
let g:airline#extensions#tabline#enabled = 1
let g:airline_theme='bubblegum'
" Trigger configuration. Do not use <tab> if you use
" https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment