В репозитории нет самих плагинов, они подключаются через vudle
Для работы необходим git.
Все горячие клавиши начинаются с двойного нажания leader.
Эти настройки использую под debian и cygwin, т.е. в linux-like должно работать.
$ git clone https://rasl@github.com/rasl/.vim.git ~/.vim
$ cd ~/.vim
$ . install.sh
Установит vundle и через него поддтянет плагины, сделает symlink'и.
Если устанавливать не в /.vim, сделает копию предыдущих настроек
(/.vim.backup ~/.vimrc.backup)
CTRL-wt- открыть нувую пустую вкладкуCTRL-j- увеличить окно по вертикалиCTRL-k- уменьшить окно по вертикалиCTRL-h- уменьшить окно по горизонталиCTRL-l- увеличить окно по горизонтали\\n- вкл/выкл нумерацию строк (3 режима)\\e- конвертация табов в пробелы и обратно\\p- вкл/выкл ингорирования автопробелов при вставке\\w- вкл/выкл перенос строк\\l- показывать/не показывать непечатаемые символы (пробебы, табы и т.д.)\\s- вкл/выкл проверку правописания\\se- вкл/выкл проверку английского\\sr- вкл/выкл проверку русского\\sre- вкл/выкл проверку правописания сразу 2х\\sre- вкл/выкл проверку правописания сразу 2х\\v- открыть конфиг .vimrc в новом tab\\vv- применить изменения конфига .vimrc\\vd- сгенерировать readme.mk из комментариев в .vimrc\- убрать подсветку поиска\\r- поиск и замена во всех открытых буферах\\m- вкл/выкл меню в gvim\\t7- применить цветовую схему railscasts (темная)\\t6- применить цветовую схему wombat256 (темная)\\t5- применить цветовую схему autumn2 (светлая)\\t4- применить цветовую схему peachpuff (контрастрая)\\t3- применить цветовую схему neon (не контрастная)\\t2- применить цветовую схему solarized (темная)\\t1- применить цветовую схему solarized (светлая, по умолчанию)\\g- gundo (древовидный вид истории изменений)\\t- tabular : Tabularize /\\tt- tabular : Tabularize /\zs\\b- bufexporer (менеджер буферов)\\pp- project (менеджер проектов)\\t- taglist (менеджер тегов)\\c- checksyntax php (вызов php-cli для проверки php синтаксиса)\\cc- phpcodesniffer (проверка стиля кодирования)\\css- CSScomb (сортировка css свойств)
Можно передвигаться с помощью hjkl в Insert mode зажав Ctrl
Стрелки и pgUp pgDown отключены
Изменение размеров окон по аналогии с hjkl с зажатым CTRL
Цветовые схемы
пакет стандартных цветовых схем
для работы нужны 256 цветов
set t_Co=256
Древовидный вид истории изменений (очень крутая штука, требует python и версию не ниже 7.3)
Автоматическое выравнивание
позволяет автоматически растовлять пробелы и табы
insert space, example: one = 1 two = 2 three = 3 four = 4
Менеджер буферов
стандартые вызовы
'\be' (normal open) '\bs' (force horizontal split open) '\bv' (force vertical split open)
мои по аналогии со всеми настройками через 2 Leader
ZenCoding
Быстрый набор html
Плагин позволяет "всё" обрамлять в кавычки, теги и т.д.
Удаление пробелов в конце строк всегда для всех файлов
При момощи этой штуки можно создать карту проекта
чтобы открыть список проектов
\C - чтобы рекурсивно добавить в проект файлы
Окно для просмотра тегов в файле
Индексация тегов
Быстрый поиск
Отладчик для dbgp заявляется работа с php, ruby, python, nodejs, perl
Vdebug (xdebug)
связка php + xdebug + vdebug отлично работает (самое главное есть мапинг файлов) настройки самого xdebug
zend_extension=/usr/lib/php5/20090626/xdebug.so
xdebug.remote_enable = on ; включить удаленную отладку (по умолчанию off)
;xdebug.remote_port = 9000
;xdebug.remote_host = 127.0.0.1
настройка vdebug
let g:vdebug_options= {
\ "port" : 9000,
\ "server" : 'localhost',
\ "timeout" : 20,
\ "on_close" : 'detach',
\ "break_on_open" : 1,
\ "ide_key" : '',
\ "path_maps" : {},
\ "debug_window_level" : 0,
\ "debug_file_level" : 0,
\ "debug_file" : "",
\ "watch_window_style" : 'expanded',
\ "marker_default" : '⬦',
\ "marker_closed_tree" : '▸',
\ "marker_open_tree" : '▾'
\}
let g:vdebug_keymap = {
\ "run" : "",
\ "run_to_cursor" : "",
\ "step_over" : "",
\ "step_into" : "",
\ "step_out" : "",
\ "close" : "",
\ "detach" : "",
\ "set_breakpoint" : "",
\ "get_context" : "",
\ "eval_under_cursor" : "",
\ "eval_visual" : "e",
\}
проверка синтаксиса
php требует php-cli
ruby требует ruby
проверяет автоматически при попытке сохранить
можно обучить и другим синтаксисам
стиль кодирования (пока отключен)
стандарт Zend
требуется phpcs (http://pear.php.net/package/PHP_CodeSniffer)
TODO: есть проблемы надо победить (не отображается код после проверки)
TODO: биндинги пересекаются с отладчиком xdebug
дополнение для функций и ключевых слов
сортировка css свойств
много плюшек для ruby (самой главной считаю словарь для автодоплнения)
много плюшек для rails (автодополнение, создание контроллеров и т.п. из vim)
:ls show the buffer list :bn open the next buffer in the current window (cycles from the end of the list to the beginning). :bp open the previous buffer in the current window (cycles from the start of the list to the end). CTRL-^ switch to the alternate file :w save the changes to a file :e! restore the original file :bd! forcibly remove the buffer from the buffer list, discarding any changes :q! force Vim to quit, discarding changes to all modified buffers
ctrl-w s split the current window horizontally, loading the same file in the new window ctrl-w v split the current window vertically, loading the same file in the new window :sp[lit] filename split the current window horizontally, loading filename in the new window :vsp[lit] filename split the current window vertically, loading filename in the new window :q[uit] close the currently active window :on[ly] close all windows except the currently active window ctrl-w w cycle between the open windows ctrl-w h focus the window to the left ctrl-w j focus the window to the down ctrl-w k focus the window to the up ctrl-w l focus the window to the right ctrl-w + increase height of current window by 1 line ctrl-w - decrease height of current window by 1 line ctrl-w _ maximise height of current window ctrl-w | maximise width of current window ctrl-w r rotate all windows ctrl-w x exchange current window with its neighbour ctrl-w H move current window to far left ctrl-w J move current window to bottom ctrl-w K move current window to top ctrl-w L move current window to far right свои переопределения - увеличить окно по вертикали - уменьшить окно по вертикали - уменьшить окно по горизонтали - увеличить окно по горизонтали
:tabe[dit] filename Open filename in a new tab ctrl-W T Move current split window into its own tab :q Close window, closing tab if it contains a single window :tabc[lose] Close the current tab page and all its windows :tabo[nly] Close all tabs apart from the current one gt Move to next tab gT Move to previous tab #gt Move to tab number # :tabmove Move current tab to the end :tabmove 0 Move current tab to the beginning :tabmove 1 Move current tab to become the 2nd tab
:e. :edit . at current working directory :sp. :split . in split at current working directory :vs. :vsplit . in vertical split at current working directory :E :Explore at directory of current file :Se :Sexplore in split at directory of current file :Ve :Vexplore in vertical split at directory of current file % create a new file d create a new directory R rename the file/directory under the cursor D Delete the file/directory under the cursor
q/ Open the commandline window with history of searches q: Open the commandline window with history of commands ctrl-f Switch from commandline mode to the commandline window
автодополнение вызывается по ctrl-x дальше комбинация указывает где искать
ctrl-x ctrl-n в текущем файле ctrl-x ctrl-i во всех буферах ctrl-x ctrl-] тегах ctrl-x ctrl-f именах файлов ctrl-x ctrl-o omni ctrl-x ctrl-u user ctrl-n среди ключевых слов (т.е. практически всего)
В разных режимах работает по разному
Normal mode ds delete a surrounding cs change a surrounding ys add a surrounding yS add a surrounding and place the surrounded text on a new line + indent it yss add a surrounding to the whole line ySs add a surrounding to the whole line, place it on a new line + indent it ySS same as ySs Visual mode s in visual mode, add a surrounding S in visual mode, add a surrounding but place text on new line + indent it Insert mode CTRL-s in insert mode, add a surrounding CTRL-s CTRL-s in insert mode, add a new line + surrounding + indent CTRL-g s same as CTRL-g S same as