Skip to content

Instantly share code, notes, and snippets.

@barrysteyn
Last active December 27, 2015 04:58
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 barrysteyn/7270209 to your computer and use it in GitHub Desktop.
Save barrysteyn/7270209 to your computer and use it in GitHub Desktop.
Vim

VIM

Setup

Copy the .vimrc file below

Useful Commands

Navigation

  • `` (double backtick) - will take you back and forth in history
  • ctrl p - allows one to search for files easily

autocmd FileType python setlocal tabstop=4 softtabstop=4 shiftwidth=4 expandtab autoindent smarttab
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
set relativenumber
filetype plugin indent on
syntax enable
nnoremap <Space>w :<C-u>write<Cr>
nnoremap <Space>q :<C-u>quit<Cr>
nnoremap <Space>Q :<C-u>quit!<Cr>
nnoremap <Space>n :<C-u>call <SID>toggle_number_option()<Cr>
function! s:toggle_number_option()
if &number == 1 "Tests to see if number is active
set nonumber
elseif &relativenumber == 1 "Checks if relarive number is active
set number
else
set relativenumber
endif
endfunction
inoremap ,. <Esc>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment