Home · Linux · Vim · Programming · Trees · Quests

My .vimrc File

TODO: Update

" ========================================
" vundle
" Install: 
" git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
" :PluginInstall
" ========================================
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'gabrielelana/vim-markdown'
Plugin 'kien/ctrlp.vim'
Plugin 'mihaifm/bufstop'
Plugin 'vifm/vifm.vim'
" end my plugins
call vundle#end()

" ========================================
" Editor formatting
" ========================================
" show existing tab with 2 spaces width
set tabstop=2
" when indenting with '>'
set shiftwidth=2
" On pressing tab, insert spaces
set expandtab
set smartindent
set backspace=2
"set backspace=indent,eol,start
" smart wrapping
set wrap
set textwidth=80
filetype plugin indent on
let g:vim_markdown_folding_disabled = 1
set number
set swapfile
set dir=/tmp " don't put .swp files all over the place
colorscheme slate
syntax on

" ========================================
" Spelling
" - z= to show suggestions
" - [s, ]s to navigate errors
" - zg add to dictionary
" - set nospell / set spell to toggle
" ========================================
"set spell spelllang=en_us
"set nospell

" ========================================
" GUI settings for GVim
" ========================================
if has("gui_running")
  set guioptions-=T  " hide toolbar
  set guioptions-=m " hide menubar
  set lines=44 columns=90 " set window size
  set guifont=Cousine\ Regular\ 12
endif

" ========================================
" File Explorer
" - Vexplore to open file explorer sidebar
" ========================================
let g:netrw_banner = 0 " disable header
let g:netrw_browse_split = 4 " open files in last window
let g:netrw_winsize = 20 " set default window size

" ========================================
" Window management
" - ctrl-w <arrow|jklh> to switch windows 
" - ctrl-w +|- to change horizontal split size N rows
" - ctrl-w <|> to change vertical split size N columns
" ========================================
set splitbelow " make new hsplits appear below current
set splitright " make new vsplits appear to the right of current

" ========================================
" CtrlP settings
" - http://kien.github.io/ctrlp.vim/
" ========================================
let g:ctrlp_map = '<F3>'
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_working_path_mode = 'ra'

" ========================================
" Miscellaneous settings
" ========================================
" disable beep
set noeb vb t_vb=
" F4 = Bufstop
map <F4> :BufstopFast<CR>