Skip to content

Instantly share code, notes, and snippets.

@datakop
Last active December 22, 2015 09:08
Show Gist options
  • Save datakop/6449776 to your computer and use it in GitHub Desktop.
Save datakop/6449776 to your computer and use it in GitHub Desktop.
.vimrc file
syntax on
set number
set hlsearch
" Get scheme from here:
" https://github.com/altercation/vim-colors-solarized
" colorscheme solarized§
" set background=dark
" Disable the swap files creation
set noswapfile
" Insert 4 spaces instead tab
set tabstop=4
set shiftwidth=4
" Show hidden characters
set listchars=tab:>-,trail:~,extends:>,precedes:<
set list
" Show/hide line numbers
map <F1> :set invnumber<CR>
imap <F1> <ESC>:set invnumber<CR>
vmap <F1> <ESC>:set invnumber<CR>
" Save file
nmap <F2> :w!<CR>
imap <F2> <Esc>:w!<CR>
vmap <F2> <Esc>:w!<CR>
" Show hidden characters
nmap <F3> :set list!<CR>
imap <F3> <Esc>:set list!<CR>
vmap <F3> <Esc>:set list!<CR>
" Switch buffers
set switchbuf=usetab
nnoremap <C-s> :sbnext<CR>
nnoremap <C-a> :sbprev<CR>
" Close vim
nmap <F4> :q!<CR>
imap <F4> <Esc>:q!<CR>
vmap <F4> <Esc>:q!<CR>
" Replace tabulation symbols to the spaces
map <F8> :retab<CR>
imap <F8> <Esc>:retab<CR>
vmap <F8> <Esc>:retab<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment