Skip to content

Instantly share code, notes, and snippets.

@keegoid
Last active February 13, 2018 09:31
Show Gist options
  • Save keegoid/00a60c7355c27c692262 to your computer and use it in GitHub Desktop.
Save keegoid/00a60c7355c27c692262 to your computer and use it in GitHub Desktop.
vim-gtk settings
" vim settings
let mapleader = ',' " use comma as leader key instead of backslash
filetype plugin indent on " Automatically detect file types.
syntax on " Syntax highlighting
set mouse=a " Automatically enable mouse usage
set mousehide " Hide the mouse cursor while typing
set backspace=indent,eol,start " Backspace for dummies
set linespace=0 " No extra spaces between rows
set number " Line numbers on
set showmatch " Show matching brackets/parenthesis
set incsearch " Find as you type search
set hlsearch " Highlight search terms
set winminheight=0 " Windows can be 0 line high
set ignorecase " Case insensitive search
set smartcase " Case sensitive when uc present
set wildmenu " Show list instead of just completing
set wildmode=list:longest,full " Command <Tab> completion, list matches, then longest common part, then all.
set whichwrap=b,s,h,l,<,>,[,] " Backspace and cursor keys wrap too
set shiftwidth=2 " indent no. of spaces
set tabstop=2 " an indentation every x columns
set softtabstop=2 " let backspace delete indent
set scrolljump=1 " lines to scroll when cursor leaves screen
set scrolloff=3 " minimum lines to keep above and below cursor
set autoindent " Indent at the same level of the previous line
set spell spelllang=en_us " spell check language
set nospell " start with spell checking off
set spellcapcheck= " disable checking for words that should be capitalized
nnoremap <silent> <leader>sp :set spell!<CR> " toggle spell checking
nmap <silent> <leader>/ :nohlsearch<CR> " clear highlighted search results
au FileType gitcommit set tw=72 " wrap lines at this terminal width for git commits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment