From 3a90af41ceff55ed3ac60581b6592486c44b103f Mon Sep 17 00:00:00 2001 From: Igor V Belousov Date: Wed, 26 Aug 2020 02:56:31 +0300 Subject: [PATCH] add config --- .gitignore | 3 + colors/molokai.vim | 211 +++++++++++++++++++++++++++++++++++++++++ init.sh | 7 ++ rc/color.vim | 15 +++ rc/keymap.vim | 70 ++++++++++++++ rc/p.align.vim | 3 + rc/p.ctrlp.vim | 6 ++ rc/p.nerdtree.vim | 5 + rc/p.snipmate.vim | 1 + rc/p.taglist.vim | 1 + rc/p.vim-matchit.vim | 1 + rc/p.vim-powerline.vim | 4 + rc/plugins.vim | 20 ++++ rc/syntax.vim | 6 ++ vimrc | 42 ++++++++ 15 files changed, 395 insertions(+) create mode 100644 .gitignore create mode 100644 colors/molokai.vim create mode 100644 rc/color.vim create mode 100644 rc/keymap.vim create mode 100644 rc/p.align.vim create mode 100644 rc/p.ctrlp.vim create mode 100644 rc/p.nerdtree.vim create mode 100644 rc/p.snipmate.vim create mode 100644 rc/p.taglist.vim create mode 100644 rc/p.vim-matchit.vim create mode 100644 rc/p.vim-powerline.vim create mode 100644 rc/plugins.vim create mode 100644 rc/syntax.vim create mode 100644 vimrc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4a581c2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +bundle/* +tmp/* + diff --git a/colors/molokai.vim b/colors/molokai.vim new file mode 100644 index 0000000..aae9420 --- /dev/null +++ b/colors/molokai.vim @@ -0,0 +1,211 @@ +" Vim color file +" +" Author: Tomas Restrepo +" +" Note: Based on the monokai theme for textmate +" by Wimer Hazenberg and its darker variant +" by Hamish Stuart Macpherson +" + +hi clear + +set background=dark +if version > 580 + " no guarantees for version 5.8 and below, but this makes it stop + " complaining + hi clear + if exists("syntax_on") + syntax reset + endif +endif +let g:colors_name="molokai" + +if exists("g:molokai_original") + let s:molokai_original = g:molokai_original +else + let s:molokai_original = 0 +endif + + +hi Boolean guifg=#AE81FF +hi Character guifg=#E6DB74 +hi Number guifg=#AE81FF +hi String guifg=#E6DB74 +hi Conditional guifg=#F92672 gui=bold +hi Constant guifg=#AE81FF gui=bold +hi Cursor guifg=#000000 guibg=#F8F8F0 +hi Debug guifg=#BCA3A3 gui=bold +hi Define guifg=#66D9EF +hi Delimiter guifg=#8F8F8F +hi DiffAdd guibg=#13354A +hi DiffChange guifg=#89807D guibg=#4C4745 +hi DiffDelete guifg=#960050 guibg=#1E0010 +hi DiffText guibg=#4C4745 gui=italic,bold + +hi Directory guifg=#A6E22E gui=bold +hi Error guifg=#960050 guibg=#1E0010 +hi ErrorMsg guifg=#F92672 guibg=#232526 gui=bold +hi Exception guifg=#A6E22E gui=bold +hi Float guifg=#AE81FF +hi FoldColumn guifg=#465457 guibg=#000000 +hi Folded guifg=#465457 guibg=#000000 +hi Function guifg=#A6E22E +hi Identifier guifg=#FD971F +hi Ignore guifg=#808080 guibg=bg +hi IncSearch guifg=#C4BE89 guibg=#000000 + +hi Keyword guifg=#F92672 gui=bold +hi Label guifg=#E6DB74 gui=none +hi Macro guifg=#C4BE89 gui=italic +hi SpecialKey guifg=#66D9EF gui=italic + +hi MatchParen guifg=#000000 guibg=#FD971F gui=bold +hi ModeMsg guifg=#E6DB74 +hi MoreMsg guifg=#E6DB74 +hi Operator guifg=#F92672 + +" complete menu +hi Pmenu guifg=#66D9EF guibg=#000000 +hi PmenuSel guibg=#808080 +hi PmenuSbar guibg=#080808 +hi PmenuThumb guifg=#66D9EF + +hi PreCondit guifg=#A6E22E gui=bold +hi PreProc guifg=#A6E22E +hi Question guifg=#66D9EF +hi Repeat guifg=#F92672 gui=bold +hi Search guifg=#FFFFFF guibg=#455354 +" marks column +hi SignColumn guifg=#A6E22E guibg=#232526 +hi SpecialChar guifg=#F92672 gui=bold +hi SpecialComment guifg=#465457 gui=bold +hi Special guifg=#66D9EF guibg=bg gui=italic +hi SpecialKey guifg=#888A85 gui=italic +if has("spell") + hi SpellBad guisp=#FF0000 gui=undercurl + hi SpellCap guisp=#7070F0 gui=undercurl + hi SpellLocal guisp=#70F0F0 gui=undercurl + hi SpellRare guisp=#FFFFFF gui=undercurl +endif +hi Statement guifg=#F92672 gui=bold +hi StatusLine guifg=#455354 guibg=fg +hi StatusLineNC guifg=#808080 guibg=#080808 +hi StorageClass guifg=#FD971F gui=italic +hi Structure guifg=#66D9EF +hi Tag guifg=#F92672 gui=italic +hi Title guifg=#ef5939 +hi Todo guifg=#FFFFFF guibg=bg gui=bold + +hi Typedef guifg=#66D9EF +hi Type guifg=#66D9EF gui=none +hi Underlined guifg=#808080 gui=underline + +hi VertSplit guifg=#808080 guibg=#080808 gui=bold +hi VisualNOS guibg=#403D3D +hi Visual guibg=#403D3D +hi WarningMsg guifg=#FFFFFF guibg=#333333 gui=bold +hi WildMenu guifg=#66D9EF guibg=#000000 + +if s:molokai_original == 1 + hi Normal guifg=#F8F8F2 guibg=#272822 + hi Comment guifg=#75715E + hi CursorLine guibg=#3E3D32 + hi CursorColumn guibg=#3E3D32 + hi LineNr guifg=#BCBCBC guibg=#3B3A32 + hi NonText guifg=#BCBCBC guibg=#3B3A32 +else + hi Normal guifg=#F8F8F2 guibg=#1B1D1E + hi Comment guifg=#465457 + hi CursorLine guibg=#293739 + hi CursorColumn guibg=#293739 + hi LineNr guifg=#BCBCBC guibg=#232526 + hi NonText guifg=#BCBCBC guibg=#232526 +end + +" +" Support for 256-color terminal +" +if &t_Co > 255 + hi Boolean ctermfg=135 + hi Character ctermfg=144 + hi Number ctermfg=135 + hi String ctermfg=144 + hi Conditional ctermfg=161 cterm=bold + hi Constant ctermfg=135 cterm=bold + hi Cursor ctermfg=16 ctermbg=253 + hi Debug ctermfg=225 cterm=bold + hi Define ctermfg=81 + hi Delimiter ctermfg=241 + + hi DiffAdd ctermbg=24 + hi DiffChange ctermfg=181 ctermbg=239 + hi DiffDelete ctermfg=162 ctermbg=53 + hi DiffText ctermbg=102 cterm=bold + + hi Directory ctermfg=118 cterm=bold + hi Error ctermfg=219 ctermbg=89 + hi ErrorMsg ctermfg=199 ctermbg=16 cterm=bold + hi Exception ctermfg=118 cterm=bold + hi Float ctermfg=135 + hi FoldColumn ctermfg=67 ctermbg=16 + hi Folded ctermfg=67 ctermbg=16 + hi Function ctermfg=118 + hi Identifier ctermfg=208 + hi Ignore ctermfg=244 ctermbg=232 + hi IncSearch ctermfg=193 ctermbg=16 + + hi Keyword ctermfg=161 cterm=bold + hi Label ctermfg=229 cterm=none + hi Macro ctermfg=193 + hi SpecialKey ctermfg=81 + + hi MatchParen ctermfg=16 ctermbg=208 cterm=bold + hi ModeMsg ctermfg=229 + hi MoreMsg ctermfg=229 + hi Operator ctermfg=161 + + " complete menu + hi Pmenu ctermfg=81 ctermbg=16 + hi PmenuSel ctermbg=244 + hi PmenuSbar ctermbg=232 + hi PmenuThumb ctermfg=81 + + hi PreCondit ctermfg=118 cterm=bold + hi PreProc ctermfg=118 + hi Question ctermfg=81 + hi Repeat ctermfg=161 cterm=bold + hi Search ctermfg=253 ctermbg=66 + + " marks column + hi SignColumn ctermfg=118 ctermbg=235 + hi SpecialChar ctermfg=161 cterm=bold + hi SpecialComment ctermfg=245 cterm=bold + hi Special ctermfg=81 ctermbg=232 + hi SpecialKey ctermfg=245 + + hi Statement ctermfg=161 cterm=bold + hi StatusLine ctermfg=238 ctermbg=253 + hi StatusLineNC ctermfg=244 ctermbg=232 + hi StorageClass ctermfg=208 + hi Structure ctermfg=81 + hi Tag ctermfg=161 + hi Title ctermfg=166 + hi Todo ctermfg=231 ctermbg=232 cterm=bold + + hi Typedef ctermfg=81 + hi Type ctermfg=81 cterm=none + hi Underlined ctermfg=244 cterm=underline + + hi VertSplit ctermfg=244 ctermbg=232 cterm=bold + hi VisualNOS ctermbg=238 + hi Visual ctermbg=235 + hi WarningMsg ctermfg=231 ctermbg=238 cterm=bold + hi WildMenu ctermfg=81 ctermbg=16 + + hi Normal ctermfg=252 ctermbg=233 + hi Comment ctermfg=59 + hi CursorLine ctermbg=234 cterm=none + hi CursorColumn ctermbg=234 + hi LineNr ctermfg=250 ctermbg=234 + hi NonText ctermfg=250 ctermbg=234 +end diff --git a/init.sh b/init.sh index 7f6c096..7099954 100644 --- a/init.sh +++ b/init.sh @@ -1,3 +1,10 @@ #!/bin/sh +cd ~ git clone https://mygit.i2g.ru/biv/vimconf.git ~/.vim +cd .vim +git clone https://github.com/gmarik/Vundle.vim.git ./bundle/Vundle.vim +mkdir tmp +cd ~ +ln -s .vim/vimrc .vimrc +vim +PluginInstall +qall diff --git a/rc/color.vim b/rc/color.vim new file mode 100644 index 0000000..51f2d62 --- /dev/null +++ b/rc/color.vim @@ -0,0 +1,15 @@ +se t_Co =256 " Цвета +sy on " Подсветка синтаксиса + + " Цветовая схема +colorscheme molokai +let g:molokai_original =1 + +se cul " Подсветка строки курсора +se cuc " Подсветка столбца курсора + +if exists('+colorcolumn') +se cc =81 " Подстветка 81-ого столбца +hi ColorColumn ctermbg =16 " цвет этого столбца +end + diff --git a/rc/keymap.vim b/rc/keymap.vim new file mode 100644 index 0000000..1c3925b --- /dev/null +++ b/rc/keymap.vim @@ -0,0 +1,70 @@ +" Убрать выделение по пробелу +nnoremap :nohl:echo + +" Русский +map ё ` +map й q +map ц w +map у e +map к r +map е t +map н y +map г u +map ш i +map щ o +map з p +map х [ +map ъ ] +map ф a +map ы s +map в d +map а f +map п g +map р h +map о j +map л k +map д l +map ж ; +map э ' +map я z +map ч x +map с c +map м v +map и b +map т n +map ь m +map б , +map ю . +map Ё ~ +map Й Q +map Ц W +map У E +map К R +map Е T +map Н Y +map Г U +map Ш I +map Щ O +map З P +map Х { +map Ъ } +map Ф A +map Ы S +map В D +map А F +map П G +map Р H +map О J +map Л K +map Д L +map Ж : +map Э " +map Я Z +map Ч X +map С C +map М V +map И B +map Т N +map Ь M +map Б < +map Ю > diff --git a/rc/p.align.vim b/rc/p.align.vim new file mode 100644 index 0000000..3219b2b --- /dev/null +++ b/rc/p.align.vim @@ -0,0 +1,3 @@ +Plugin 'Align' + +vmap t" :Align " diff --git a/rc/p.ctrlp.vim b/rc/p.ctrlp.vim new file mode 100644 index 0000000..f8019d9 --- /dev/null +++ b/rc/p.ctrlp.vim @@ -0,0 +1,6 @@ +Plugin 'ctrlp.vim' + +nmap l :CtrlPLine +nmap b :CtrlPBuff +nmap m :CtrlPBufTag +nmap M :CtrlPBufTagAll diff --git a/rc/p.nerdtree.vim b/rc/p.nerdtree.vim new file mode 100644 index 0000000..f6b41b7 --- /dev/null +++ b/rc/p.nerdtree.vim @@ -0,0 +1,5 @@ +Plugin 'scrooloose/nerdtree' + +map :NERDTreeToggle +vmap :NERDTreeToggle +imap :NERDTreeToggle diff --git a/rc/p.snipmate.vim b/rc/p.snipmate.vim new file mode 100644 index 0000000..20fe39b --- /dev/null +++ b/rc/p.snipmate.vim @@ -0,0 +1 @@ +Plugin 'snipMate' diff --git a/rc/p.taglist.vim b/rc/p.taglist.vim new file mode 100644 index 0000000..52216e0 --- /dev/null +++ b/rc/p.taglist.vim @@ -0,0 +1 @@ +Plugin 'taglist.vim' diff --git a/rc/p.vim-matchit.vim b/rc/p.vim-matchit.vim new file mode 100644 index 0000000..a7b9d1d --- /dev/null +++ b/rc/p.vim-matchit.vim @@ -0,0 +1 @@ +Plugin 'chrisbra/matchit' diff --git a/rc/p.vim-powerline.vim b/rc/p.vim-powerline.vim new file mode 100644 index 0000000..793d7fd --- /dev/null +++ b/rc/p.vim-powerline.vim @@ -0,0 +1,4 @@ +Plugin 'Lokaltog/vim-powerline' + +let g:Powerline_symbols ='fancy' " символы PowerLine + diff --git a/rc/plugins.vim b/rc/plugins.vim new file mode 100644 index 0000000..9363d54 --- /dev/null +++ b/rc/plugins.vim @@ -0,0 +1,20 @@ +set nocompatible +filetype off + +set rtp+=~/.vim/bundle/Vundle.vim +call vundle#begin() + +Plugin 'VundleVim/Vundle.vim' + +so ~/.vim/rc/p.ctrlp.vim " Нечёткий поиск по файлам, буферам, тегам, ... +so ~/.vim/rc/p.vim-powerline.vim " Мощная стутусная строка +so ~/.vim/rc/p.nerdtree.vim " Дерево файлов +so ~/.vim/rc/p.taglist.vim " Браузер кода +so ~/.vim/rc/p.snipmate.vim " Сниплеты +so ~/.vim/rc/p.vim-matchit.vim " Перемещения по тегам и т.п. +so ~/.vim/rc/p.align.vim " Выравнивание + +so ~/.vim/rc/syntax.vim " подсветка ситаксиса + +call vundle#end() +filetype plugin indent on diff --git a/rc/syntax.vim b/rc/syntax.vim new file mode 100644 index 0000000..fc0760a --- /dev/null +++ b/rc/syntax.vim @@ -0,0 +1,6 @@ +Bundle 'evidens/vim-twig' +Bundle 'Markdown' +Bundle 'othree/html5.vim' +Bundle 'lepture/vim-css' +Bundle 'vim-stylus' +Bundle '2072/vim-syntax-for-PHP.git' diff --git a/vimrc b/vimrc new file mode 100644 index 0000000..8c6af93 --- /dev/null +++ b/vimrc @@ -0,0 +1,42 @@ +so ~/.vim/rc/plugins.vim " Подключение расширений +so ~/.vim/rc/color.vim " Настройка цветов + + " Мышка +se mouse =a +se mousem =popup + +se nu " Нумеровать строки +se nuw =5 " Ширина поля нумерации строк + +se so =2 " Количество строк сверху и снизу при прокрутке + +se sw =4 " + +se et " Табуляция -> пробелы +se tw =80 + +se ar " Перечитывать измененные файлы автоматически +se ls =2 " Всегда показывать строку состояния +se enc =utf-8 " Кодировка + + " Поиск +se ic " Не учитывать регистр +se hls " Подсветка результатов +se is " Поиск во время набора +se scs " Учитывать регистр, если введены сиволы в + " верхнем регистре + +se sc " Отображать команды + +se sm " Показывать первую парную скобку после ввода второй + +se hid " Отключения сохранения буфера + +se hi =250 " записей в истории + +se bdir =~/.vim/tmp +se dir =~/.vim/tmp +se vdir =~/.vim/tmp + +so ~/.vim/rc/keymap.vim " Подключение переопредений клавиатуры +