Created
June 23, 2018 00:23
-
-
Save joekarl/5dbd242b3b0b090e7a7a394e52a250bd to your computer and use it in GitHub Desktop.
vimrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on | |
nnoremap <Left> :echoe "Use h"<CR> | |
nnoremap <Right> :echoe "Use l"<CR> | |
nnoremap <Up> :echoe "Use k"<CR> | |
nnoremap <Down> :echoe "Use j"<CR> | |
" Recursive path for file search | |
set path+=** | |
"Always show current position | |
set ruler | |
" Height of the command bar | |
set cmdheight=2 | |
" Highlight search results | |
set hlsearch | |
" Ignore case when searching | |
set ignorecase | |
set ai "Auto indent | |
set si "Smart indent | |
set wrap "Wrap lines | |
" Wild menu | |
set wildmenu | |
" Use spaces instead of tabs | |
set expandtab | |
" Be smart when using tabs ;) | |
set smarttab | |
" 1 tab == 2 spaces | |
set shiftwidth=2 | |
set tabstop=2 | |
autocmd FileType c setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=4 | |
" Smart way to move between windows | |
map <C-j> <C-W>j | |
map <C-k> <C-W>k | |
map <C-h> <C-W>h | |
map <C-l> <C-W>l | |
" Show line numbers | |
set number | |
"set relativenumber | |
set updatetime=100 | |
" Initialize plugin system | |
call plug#begin('~/.vim/plugged') | |
Plug 'derekwyatt/vim-scala' | |
Plug 'keith/swift.vim' | |
Plug 'octol/vim-cpp-enhanced-highlight' | |
Plug 'airblade/vim-gitgutter' | |
Plug 'altercation/vim-colors-solarized' | |
Plug 'kien/rainbow_parentheses.vim' | |
call plug#end() | |
set background=dark | |
let g:solarized_termcolors=256 | |
colorscheme solarized | |
au VimEnter * RainbowParenthesesToggle | |
au Syntax * RainbowParenthesesLoadRound | |
au Syntax * RainbowParenthesesLoadSquare | |
au Syntax * RainbowParenthesesLoadBraces | |
" Add full file path to your existing statusline | |
set laststatus=2 | |
" Set list view for netrw | |
let g:netrw_liststyle = 3 | |
" Specific to my machine and iTerm2 | |
autocmd BufEnter *.png,*.jpg,*.jpeg,*gif exec "! ~/.iterm2/imgcat ".expand("%") | :bw |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment