Skip to content

Instantly share code, notes, and snippets.

@LukasRychtecky
Created October 19, 2014 09:34
Show Gist options
  • Save LukasRychtecky/e51045a70e0f3a39906f to your computer and use it in GitHub Desktop.
Save LukasRychtecky/e51045a70e0f3a39906f to your computer and use it in GitHub Desktop.
.vimrc
set nocompatible
" Use pathogen to easily modify the runtime path to include all
" plugins under the ~/.vim/bundle directory
call pathogen#helptags()
call pathogen#infect()
" change the mapleader from \ to ,
let mapleader=","
" Quickly edit/reload the vimrc file
nmap <silent> <leader>ev :e $MYVIMRC<CR>
nmap <silent> <leader>sv :so $MYVIMRC<CR>
set hidden
set nowrap " don't wrap lines
set tabstop=4 " a tab is four spaces
set backspace=indent,eol,start " allow backspacing over everything in insert mode
set autoindent " always set autoindenting on
set copyindent " copy the previous indentation on autoindenting
set number " always show line numbers
set shiftwidth=4 " number of spaces to use for autoindenting
set shiftround " use multiple of shiftwidth when indenting with '<' and '>'
set showmatch " set show matching parenthesis
set ignorecase " ignore case when searching
set smartcase " ignore case if search pattern is all lowercase, case-sensitive otherwise
set smarttab " insert tabs on the start of a line according to
set hlsearch " highlight search terms
set incsearch " show search matches as you type
set history=1000 " remember more commands and search history
set undolevels=1000 " use many muchos levels of undo
set wildignore=*.swp,*.bak,*.pyc,*.class
set title " change the terminal's title
set visualbell " don't beep
set noerrorbells " don't beep
set nobackup
set noswapfile
set laststatus=2
set statusline+=\ %f "tail of the filename
set statusline+=\ col:\ %c
set statusline+=\ row:\ %l
filetype plugin indent on
autocmd filetype python set expandtab
"autocmd filetype coffee set tabstop=2 shiftwidth=2
set pastetoggle=<F2>
" Easy window navigation
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
nmap <silent> ,/ :nohlsearch<CR> " clean search term when not found
set list
set listchars=tab:→\ ,trail:.,extends:#,nbsp:.
set encoding=utf-8
syntax enable
set background=dark
"set expandtab shiftwidth=4 smarttab softtabstop=4
"set smartindent
"colorscheme railscasts2
"colorscheme mustang
colorscheme jellybeans
set omnifunc=syntaxcomplete#Complete
set completeopt+=longest
set pastetoggle=<F2>
"autocmd VimEnter * NERDTree
autocmd VimEnter * wincmd w
autocmd BufWritePre *.[py|sass|coffee] normal m`:%s/\s\+$//e``
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" alternatively, pass a path where Vundle should install bundles
"let path = '~/some/path/here'
"call vundle#rc(path)
" let Vundle manage Vundle, required
Bundle 'gmarik/vundle'
Bundle 'kchmck/vim-coffee-script'
" The following are examples of different formats supported.
" Keep bundle commands between here and filetype plugin indent on.
" scripts on GitHub repos
"Bundle 'tpope/vim-fugitive'
"Bundle 'Lokaltog/vim-easymotion'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
"Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
" scripts from http://vim-scripts.org/vim/scripts.html
"Bundle 'L9'
"Bundle 'FuzzyFinder'
" scripts not on GitHub
"Bundle 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
"Bundle 'file:///home/gmarik/path/to/plugin'
" ...
"
" Brief help
" :BundleList - list configured bundles
" :BundleInstall(!) - install (update) bundles
" :BundleSearch(!) foo - search (or refresh cache first) for foo
" :BundleClean(!) - confirm (or auto-approve) removal of unused bundles
"
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Bundle commands are not allowed.
set runtimepath^=~/.vim/bundle/ctrlp.vim
let NERDTreeIgnore = ['\.pyc$']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment