Skip to content

Instantly share code, notes, and snippets.

@younata
Last active August 29, 2015 14:10
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 younata/c1c6fa2df0762e056afa to your computer and use it in GitHub Desktop.
Save younata/c1c6fa2df0762e056afa to your computer and use it in GitHub Desktop.
.vimrc
syntax on
set tabstop=2
set expandtab
set shiftwidth=2
let mapleader = ","
nnoremap / /\v
vnoremap / /\v
set gdefault
set ignorecase
set smartcase
set incsearch
set showmatch
set hlsearch
nnoremap <tab> %
vnoremap <tab> %
inoremap <F1> <ESC>
nnoremap <F1> <ESC>
vnoremap <F1> <ESC>
nnoremap <leader>w <C-w>v<C-w>l
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
au FocusLost * :silent! wall " Save on FocusLost
au FocusLost * call feedkeys("\<C-\>\<C-n>") " Return to normal mode on FocustLost
cmap w!! %!sudo tee > /dev/null %
map <f5> :w <CR>!clear <CR>:!python % <CR>
if has('gui_macvim')
nnoremap <silent> <SwipeLeft> :macaction _cycleWindowsBackwards:<CR>
nnoremap <silent> <SwipeRight> :macaction _cycleWindows:<CR>
endif
au BufRead,BufNewFile *.md set filetype=markdown
execute pathogen#infect()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment