Skip to content

Instantly share code, notes, and snippets.

@carlosipe
Created May 8, 2017 08:40
Show Gist options
  • Select an option

  • Save carlosipe/8d35077856f094b16d5308e75b27db66 to your computer and use it in GitHub Desktop.

Select an option

Save carlosipe/8d35077856f094b16d5308e75b27db66 to your computer and use it in GitHub Desktop.
.vimrc
" Basic stuff, leader to space, remap esc, saving files
:let mapleader = " "
:nnoremap <leader>ev :vsplit $MYVIMRC<cr>
:imap jk <Esc>
:nnoremap <Leader>s :update<CR>
:nnoremap <Leader>x :x<CR>
:nnoremap <Leader>q :bd<CR>
:nnoremap <Up> <nop>
:nnoremap <Down> <nop>
:nnoremap <Left> <nop>
:nnoremap <Right> <nop>
" Text indentantion
:set expandtab
:set shiftwidth=2
:set autoindent
:filetype indent plugin on
" Don't use swp files (not sure yet if it's a good idea or not)
:set noswapfile
" Close brackets
:inoremap { {}<Left>
:inoremap {<CR> {<CR>}<Esc>O
:inoremap {{ {
:inoremap {} {}
"Finding files
set wildmode=list:longest
" Colorscheme
" :colorscheme molokai
: colorscheme railscasts
" :set foldcolumn=2 "padding on left
" :set exrc (enable .vimrc per project, disabled by default for security
" reasons) /if enabled it's a good idea to also :set secure
:set nowrap
:set cursorline
:set number
"hide buffers when not displayed | This allow to switch between buffers
"without saving
:set hidden
"
"" utf-8 default encoding
:set enc=utf-8
:map <Leader><Tab> :bn<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment