Skip to content

Instantly share code, notes, and snippets.

@JFriel
Created January 23, 2016 14:03
Show Gist options
  • Save JFriel/1729dc6bb81b49a7332a to your computer and use it in GitHub Desktop.
Save JFriel/1729dc6bb81b49a7332a to your computer and use it in GitHub Desktop.
inoremap jk <ESC>
let mapleader = "\<Space>"
"map the windowing to easier commands
noremap <silent> ss <C-W>s
noremap <silent> vv <C-W>v
noremap <silent> qq <C-W>q
"map the move between windows to be a bit nicer in insert mode
map <silent><down><down> <C-W>j
map <silent><up><up> <C-W>k
map <silent><right><right> <C-W>l
map <silent><left><left> <C-W>h
filetype plugin indent on
syntax on
"searching
set showmatch
set ignorecase
set smartcase
set hlsearch
set noerrorbells
set ruler
set autoread
set encoding=utf-8
set background=dark
colorscheme gruvbox
set history=100
"tabbing
set expandtab
set smarttab
set shiftwidth=4
set tabstop=4
"indent
set ai "auto indent
set si "smart indent
"plugins
set runtimepath^=~/.vim/bundle/ctrlp.vim
map <C-\> :NERDTreeToggle<CR>
nnoremap <silent> <C-\> :NERDTreeFind<CR>:vertical res 30<CR>
" Delete trailing white space on save, useful for Python and CoffeeScript ;)
func! DeleteTrailingWS()
exe "normal mz"
%s/\s\+$//ge
exe "normal `z"
endfunc
autocmd BufWrite *.py :call DeleteTrailingWS()
autocmd BufWrite *.coffee :call DeleteTrailingWS()
"copy and paste to the syste of Codility is to assess thism register
nmap s <Nop>
vmap s <Nop>
nmap sy "+y
nmap sp "+p
nmap sY "+Y
nmap sP "+P
set clipboard=unnamedplus
nmap ; :
nmap <C-i> ggVG=<C-o><C-o>
nmap // :nohlsearch<CR>
"in normal mode map ; to the command console
nmap ; :
"Disable replace mode so it doesn't destroy undo history
nmap R <Nop>
nmap r <Nop>
nmap tab ggVG=<C-o><C-o>
" Map Ctrl-Backspace to delete the previous word in insert mode.
:imap <C-BS> <C-W>
set nowrap
set number
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment