Skip to content

Instantly share code, notes, and snippets.

@larssmit
Last active February 18, 2019 10:16
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larssmit/1564561 to your computer and use it in GitHub Desktop.
Save larssmit/1564561 to your computer and use it in GitHub Desktop.
My MacVim settings
" -----------------------------------------------------------------------------
" VIM Configuration for Janus (https://github.com/carlhuda/janus.git)
" Lars Smit larssmit@me.com
" -----------------------------------------------------------------------------
" -----------------------------------------------------------------------------
" Basics
" -----------------------------------------------------------------------------
set encoding=utf8
set noswapfile
set nocompatible
set hidden
set history=1000
" -----------------------------------------------------------------------------
" Gui settings
" -----------------------------------------------------------------------------
set background=dark
colorscheme solarized
set guifont=Menlo:h14
set showtabline=2
set linespace=2
" -----------------------------------------------------------------------------
" Set VIM window settings
" -----------------------------------------------------------------------------
if has("gui_running")
set guioptions-=T "Remove toolbar
set transparency=0
set guioptions=aAce
set undofile
endif
" -----------------------------------------------------------------------------
" NERDTree configuration
" -----------------------------------------------------------------------------
let NERDChristmasTree = 1
let NERDTreeHighlightCursorline = 1
let NERDTreeShowBookmarks = 1
let NERDTreeStatusline = 1
let NERDTreeSortOrder = ['\/$', '*', '\.swp$', '\.bak$', '\~$']
let NERDTreeWinSize = 45
let NERDTreeChDirMode= 2
" -----------------------------------------------------------------------------
" Status line customization
" -----------------------------------------------------------------------------
set statusline=%<%t\ %h%w%m%r%y%=C:%v\ L:%l/%L\ (%p%%)
set laststatus=2
" -----------------------------------------------------------------------------
" Set ruler
" -----------------------------------------------------------------------------
set ruler
set rulerformat=%=%h%m%r%w\ %(%c%V%),%l/%L\ %P
" -----------------------------------------------------------------------------
" Search settings
" -----------------------------------------------------------------------------
set ignorecase
set smartcase
set incsearch "Find the next match as we type the search
set hlsearch "Hilight searches by default
" -----------------------------------------------------------------------------
" Scrolling settings
" -----------------------------------------------------------------------------
set scrolloff=8 "Start scrolling when we're 8 lines away from margins
set sidescrolloff=15
set sidescroll=1
" -----------------------------------------------------------------------------
" No sound on errors
" -----------------------------------------------------------------------------
set noerrorbells
set novisualbell
" -----------------------------------------------------------------------------
" Open Buffergator in a horizontally window
" -----------------------------------------------------------------------------
let g:buffergator_autoexpand_on_split = 0
let g:buffergator_viewport_split_policy = "B"
let g:buffergator_split_size = 15
" -----------------------------------------------------------------------------
" Mapping for generating CTags file for project
" -----------------------------------------------------------------------------
map <Leader>ta :!ctags -R .<CR>
" -----------------------------------------------------------------------------
" Set Undo files dir
" -----------------------------------------------------------------------------
set undofile
set undodir=~/.vim/_temp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment