Skip to content

Instantly share code, notes, and snippets.

@jserpapinto jserpapinto/.vimrc
Last active Jun 21, 2019

What would you like to do?
~/.vimrc default configAwsome vim configs ->
let mapleader=" "
nnoremap <SPACE> <Nop>
set nocompatible " be iMproved, required
filetype off " required
" Vundle begin
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim' " let Vundle manage Vundle, required
Plugin 'tpope/vim-fugitive' " git plugin
Plugin 'hashivim/vim-terraform' " terraform
Plugin 'vim-syntastic/syntastic' " vim-terraform-completion dependency
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
Plugin 'juliosueiras/vim-terraform-completion' " terraform completion
Plugin 'junegunn/fzf' " fuzzy finder
Plugin 'junegunn/fzf.vim' " fuzzy finder
nmap ; :Buffers<CR>
nmap <Leader>f :Files<CR>
nmap <Leader>t :Tags<CR>
Plugin 'itchyny/lightline.vim' " colors for modes
set laststatus=2
Plugin 'scrooloose/nerdtree' " NERDTree
map <C-o> :NERDTreeToggle<CR>
Plugin 'airblade/vim-gitgutter' " also for git
set updatetime=500
Plugin 'pearofducks/ansible-vim'
au BufRead,BufNewFile */{playbooks,plays}/*.yml set filetype=yaml.ansible
au BufRead,BufNewFile */templates/* set filetype=ruby.jinja2
call vundle#end() " required
filetype plugin indent on " required
" Vundle end
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" Vagrantfile
augroup vagrant
au BufRead,BufNewFile Vagrantfile set filetype=ruby
augroup END
" As seen here:
colorscheme badwolf " awesome colorscheme
syntax enable " enable syntax processing
set tabstop=2 shiftwidth=2 expandtab " number of visual spaces per TAB
set softtabstop=2 " number of spaces in tab when editing
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab " Get the 2-space YAML as the default when hit carriage return after the colon
set nu rnu " show line numbers
set showcmd " show command in bottom bar
set cursorline " highlight current line
filetype indent on " load filetype-specific indent files
set wildmenu " visual autocomplete for command menu
set lazyredraw " redraw only when we need to.
set showmatch " highlight matching [{()}]
set incsearch " search as characters are entered
set hlsearch " highlight matches
" turn off search highlight
nnoremap <leader><space> :nohlsearch<CR>
" move vertically by visual line
nnoremap j gj
nnoremap k gk
" highlight last inserted text
nnoremap gV `[v`]
set mouse=a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.