Skip to content

Instantly share code, notes, and snippets.

@aerosayan
Created January 31, 2020 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aerosayan/2f337c7fe34db78cd004c82289ddee2e to your computer and use it in GitHub Desktop.
Save aerosayan/2f337c7fe34db78cd004c82289ddee2e to your computer and use it in GitHub Desktop.
aerosayan vimrc
"--------------------------------------------------------------------
"run pathogen package manager
execute pathogen#infect()
"--------------------------------------------------------------------
set nocompatible "run in vim mode
"set expandtab "expand tabs into spaces
set noexpandtab "don't expand tabs into spaces
set autoindent "auto-indent new lines
set smartindent "return ending brackets to proper locations
set softtabstop=4 "indentation level of soft-tabs
set tabstop=4 "indentation leves of normal tabs
set shiftwidth=4 "how many columns to re-indent with << and >>
set showmatch "show matching brackets
set ruler "show cursor position at all times
set nohls "don't highlight the previous search term
set number "turn on line numbering
set wrap "turn on visual word wrapping
set linebreak "only break lines on 'breakat' characters
colo monokai "colorscheme
set background=light "set background
syntax on "turn on syntax highlighting
set list "list special characters
set listchars=tab:>-,trail:@ "display tabs as >-
" GO syntax
set rtp+=$GOROOT/misc/vim
" Syntax highlighting
filetype plugin indent on
syntax on
"--------------------------------------------------------------------
" key remaps
:nnoremap <F2> :w<CR>
:nnoremap <S-F2> :wa
:nnoremap <F3> :tabnew
:nnoremap <F7> gT
:nnoremap <F8> gt
:nnoremap <F12> :q<CR>
:nnoremap <S-F12> :qa
"--------------------------------------------------------------------
" Map CAPS_LOCK to CTRL+^
" Execute 'lnoremap x X' and 'lnoremap X x' for each letter a-z.
for c in range(char2nr('A'), char2nr('Z'))
execute 'lnoremap ' . nr2char(c+32) . ' ' . nr2char(c)
execute 'lnoremap ' . nr2char(c) . ' ' . nr2char(c+32)
endfor
"--------------------------------------------------------------------
" Nerdtree customization
nnoremap <silent> <Leader>f :NERDTreeToggle<Enter>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment