Skip to content

Instantly share code, notes, and snippets.

@basp1
Last active March 27, 2019 06:10
Show Gist options
  • Save basp1/8dd43e33f88cfe4e74899fe30626dd0e to your computer and use it in GitHub Desktop.
Save basp1/8dd43e33f88cfe4e74899fe30626dd0e to your computer and use it in GitHub Desktop.
vimrc
" Plugins:
" https://github.com/scrooloose/nerdtree
" https://github.com/mbbill/undotree
" https://github.com/rafi/awesome-vim-colorschemes
" https://github.com/ntpeters/vim-better-whitespace
" https://github.com/xolox/vim-misc
" https://github.com/xolox/vim-session
" https://github.com/Shougo/vimproc.vim
" https://github.com/Shougo/vimshell.vim
set langmenu=en_US
let $LANG = 'en_US'
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
execute pathogen#infect()
syntax on
filetype plugin indent on
set guioptions+=a
set clipboard=unnamed
" Switch buffer without saving
set hidden
" Backspace in insert node
set backspace=2
let g:session_autosave = 'no'
" Move current line
nnoremap <C-down> :m .+1<CR>==
nnoremap <C-up> :m .-2<CR>==
inoremap <C-down> <Esc>:m .+1<CR>==gi
inoremap <C-up> <Esc>:m .-2<CR>==gi
vnoremap <C-down> :m '>+1<CR>gv=gv
vnoremap <C-up> :m '<-2<CR>gv=gv
" Set to auto read when a file is changed from the outside
set autoread
"Always show current position
set ruler
" Don't redraw while executing macros (good performance config)
set lazyredraw
" No annoying sound on errors
set noerrorbells
set novisualbell
set t_vb=
set tm=500
" Turn backup off, since most stuff is in SVN, git et.c anyway...
set nobackup
set nowb
set noswapfile
" Use spaces instead of tabs
set expandtab
set shiftwidth=4
set softtabstop=4
set autoindent
set smartindent
let g:better_whitespace_ctermcolor='gray'
let g:better_whitespace_guicolor='gray'
let g:better_whitespace_enabled=1
let g:strip_whitespace_on_save=1
" Remap VIM 0 to first non-blank character
map 0 ^
nnoremap <C-tab> :b #<cr>
nnoremap <silent> <right> <C-w>l
nnoremap <silent> <left> <C-w>h
nnoremap <silent> <down> <C-w>j
nnoremap <silent> <up> <C-w>k
nnoremap <NL> i<CR><ESC>
map <C-o> :NERDTreeToggle<CR>
set enc=utf8
set guioptions-=T " no toolbar
set guioptions-=r " remove right-hand scroll bar
set guioptions-=L " remove left-hand scroll bar
set lines=42 columns=130 linespace=0
set guifont=Consolas:h11:cANSI
set guicursor+=a:blinkon0
set langmap=ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment