Skip to content

Instantly share code, notes, and snippets.

@ssaid
Last active November 5, 2015 14:13
Show Gist options
  • Save ssaid/e282f05a257b80682a54 to your computer and use it in GitHub Desktop.
Save ssaid/e282f05a257b80682a54 to your computer and use it in GitHub Desktop.
VIMRC (Installs vundle too..)
" no vi-compatible
set nocompatible
" Setting up Vundle - the vim plugin bundler
let iCanHazVundle=1
let vundle_readme=expand('~/.vim/bundle/vundle/README.md')
if !filereadable(vundle_readme)
echo "Installing Vundle.."
echo ""
silent !mkdir -p ~/.vim/bundle
silent !git clone https://github.com/gmarik/vundle ~/.vim/bundle/vundle
let iCanHazVundle=0
endif
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
"Add your bundles here
Bundle 'Syntastic'
Bundle 'altercation/vim-colors-solarized'
Bundle 'https://github.com/tpope/vim-fugitive'
Bundle 'airblade/vim-gitgutter'
Bundle 'scrooloose/nerdtree'
"...All your other bundles...
if iCanHazVundle == 0
echo "Installing Bundles, please ignore key map error messages"
echo ""
:BundleInstall
endif
" Setting up Vundle - the vim plugin bundler end
" ============================================================================
" Vim settings and mappings
" allow plugins by file type (required for plugins!)
filetype plugin on
filetype indent on
" tabs and spaces handling
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4
" tab length exceptions on some file types
autocmd FileType html setlocal shiftwidth=2 tabstop=2 softtabstop=2
autocmd FileType htmldjango setlocal shiftwidth=2 tabstop=2 softtabstop=2
autocmd FileType javascript setlocal shiftwidth=2 tabstop=2 softtabstop=2
" Ignore common mistakes
:command WQ wq
:command Wq wq
:command W w
:command Q q
" always show status bar
set ls=2
" incremental search
set incsearch
" highlighted search results
set hlsearch
" syntax highlight on
syntax on
" show line numbers
set nu
"Mappings Configuration
let mapleader="," "change the mapleader to ,
let g:mapleader="," "change the mapleader to ,
",/ limpia la busqueda
nmap <silent> ,/ :nohlsearch<CR>
" toggle nerdtree display: F1
map <F1> :NERDTreeToggle<CR>
map <F2> :NERDTreeFind<CR>
"PLUGINS Configuration
"-NerdTree
let NERDTreeIgnore=['\.pyc$', '\~$']
@ssaid
Copy link
Author

ssaid commented Nov 5, 2015

For installing from command line(when packing in docker) use command RUN vim +PluginInstall +qall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment