" Settings
"--------------------------
autocmd!
filetype indent on " Включить отступы
filetype plugin on
syntax on " turn syntax highlighting on
set autoindent
set autowriteall " write before chanfes
set background=dark
set backspace=indent,eol,start
set backup
set backupdir=$HOME/.vim/backups
" set directory=$HOME/.vim/temp
set backspace=indent,eol,start
set encoding=utf-8
set termencoding=utf-8
set expandtab
set fo+=cr
set foldlevel=25
set foldmethod=indent
set hidden " Не выгружать буфер, когда переключаемся на другой
set history=50 " keep 50 lines in command history
set ignorecase " ingore lower/UPPER case on search
set incsearch " on search instantly go to found text when typing
set laststatus=2 " Always show status-line
set lbr
set mouse=a " enable mouse support
set mousehide " Hide mouse cursor when typing
set mousemodel=popup
set nocompatible
set nohlsearch
set novisualbell
set nowrap " не разрывать строку
set number
set ruler
set scrolljump=7
set scrolloff=7
set sessionoptions=curdir,buffers,tabpages
set shiftwidth=4
set showcmd " show partial command in status line
set showmatch " Показывать совпадающую скобку
set sidescroll=5 " left/right scroll
set smartindent
set softtabstop=4
set tabstop=4
set termencoding=utf-8
set ts=4
set wildmenu
set wcm=
menu Encoding.koi8-r :e ++enc=koi8-r
menu Encoding.windows-1251 :e ++enc=cp1251
menu Encoding.cp866 :e ++enc=cp866
menu Encoding.utf-8 :e ++enc=utf8
highlight Comment ctermfg=Blue " Цвет комментариев
nnoremap j gj
nnoremap k gk
vnoremap j gj
vnoremap k gk
nnoremap
nnoremap
vnoremap
vnoremap
inoremap
inoremap
if &term =~ "xterm"
let &t_SI = "\
let &t_EI = "\
endif
" Making executable files, starting with #!/bin/enterpreter
function ModeChange()
if getline(1) =~ "^#!"
if getline(1) =~ "/bin/"
silent !chmod a+x
endif
endif
endfunction
au BufWritePost * call ModeChange()
"-------------------------
" Hotkeys
"-------------------------
nmap
" CTRL-F для omni completion
"imap
" C-c and C-v - Copy/Paste в global clipboard'
vmap
imap
" Shift-Insert works like in Xterm
map
" C-y - current line deletion
nmap
imap
" C-d - current line dublicate
imap
nmap
vmap
imap
nmap
vmap
imap
map
nmap
imap
map
nmap
imap
nmap
imap
" Exit on F10
imap
nmap
" On/off line numbers by F11
imap
nmap
" Редко когда надо [ без пары =)
imap [ []
" Аналогично и для {
imap {
" С-q - выход из Vim БЕЗ СОХРАНЕНИЯ!
map
" Usefull commands & Hotkeys:
" Ctrl-Y вставит символ, который находится на строке выше на той же позиции, что и курсор.
" Ctrl-E — соответственно на строке ниже.
Комментариев нет:
Отправить комментарий