Skip to content

Instantly share code, notes, and snippets.

@marcinwadon
Last active February 1, 2016 12:33
Show Gist options
  • Save marcinwadon/4eb32fa627f32d1783ec to your computer and use it in GitHub Desktop.
Save marcinwadon/4eb32fa627f32d1783ec to your computer and use it in GitHub Desktop.
.vimrc
execute pathogen#infect()
syntax on
filetype plugin indent on
autocmd BufEnter * lcd %:p:h
" show line numbers
set number
set ruler
set showmatch
set mat=2
filetype on
filetype plugin on
filetype indent on
set autoread
set encoding=utf-8
set fileencoding=utf-8
set backspace=indent,eol,start
set hidden
set fileformat=unix
set fileformats=unix,dos
" CUSTOMIZATION
nmap <c-s> :w<CR>
imap <c-s> <Esc>:w<CR>i
vmap <Tab> >gv
vmap <S-Tab> <gv
set nobackup
set writebackup
set noswapfile
set incsearch
set hlsearch
colorscheme slate
set expandtab
set autoindent
set smartindent
set shiftwidth=4
set softtabstop=4
let mapleader = ","
inoremap <Nul> <C-n>
inoremap <C-Space> <C-n>
noremap <leader>a ggVG
autocmd VimEnter * NERDTree
autocmd VimEnter * wincmd p
autocmd Filetype css setlocal tabstop=2
autocmd Filetype css setlocal shiftwidth=2
noremap <leader>b :FufBuffer<cr>
noremap <leader>f :FufFile<cr>
autocmd BufWritePost *.js silent :JSHint
map <F2> :NERDTreeToggle<CR>
let NERDTreeShowHidden=1
nnoremap <C-S-tab> gT<CR>
nnoremap <C-tab> gt<CR>
nnoremap <C-t> :tabnew<CR>
"nnoremap <C-w> :tabclose<CR>
inoremap <C-S-tab> <Esc>gT<CR>i
inoremap <C-tab> <Esc>gt<CR>i
inoremap <C-t> <Esc>:tabnew<CR>
"inoremap <C-w> <Esc>:tabclose<CR>
map <leader>tn :tabnew<cr>
map <leader>to :tabonly<cr>
map <leader>tc :tabclose<cr>
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
set viminfo^=%
map 0 ^
"nmap <M-j> mz:m+<cr>`z
"nmap <M-k> mn:m-2<cr>`z
"nmap <M-j> :m'>+<cr>`<my`>mzgv`yo`z
"nmap <M-k> :m'<-2<cr>`>my`<mzgv`yo`z
"Plugins:
"ctrlp.vim
"delimitMate
"html5.vim
"jellybeans.vim
"jshint2.vim
"lightline.vim
"nerdcommenter
"nerdtree
"nerdtree-git-plugin
"syntastic
"tagbar
"vim-colors-solarized
"vim-girignore
"vim-javascript
"vim-json
"vim-sensible
"vim-surround
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment