Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:berekuk/etc
- Loading branch information
Showing
12 changed files
with
191 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
init-author-name = Vyacheslav Matyukhin | ||
init-author-email = me@berekuk.ru |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
" Easier to type than default '\'. | ||
let mapleader = "," | ||
let maplocalleader = "," | ||
|
||
" Disable search highlight. | ||
map <F2> :nohlsearch<CR> | ||
" Toggle visibility of tabs and spaces. | ||
map <F3> :set list!<CR> | ||
" I switched off 'use all F* keys as standard function keys' setting on my Mac | ||
" recently, so hitting F3 is now less convenient | ||
map <Leader><Tab> :set list!<CR> | ||
" Switch encoding. | ||
" I rarely use it these days. | ||
map <F5> :e ++enc=cp1251<CR> | ||
map <F6> :e ++enc=utf-8<CR> | ||
map <F7> :e ++enc=koi8-r<CR> | ||
" Disable Ex mode - I never use it. | ||
" See also: http://stackoverflow.com/questions/1269689/to-disable-entering-ex-mode-in-vim | ||
map Q <Nop> | ||
" toggle 'set paste' | ||
set pastetoggle=<F8> | ||
|
||
" delete all trailing spaces | ||
nnoremap <Leader><Space> :%s/\s\+$//<CR> | ||
" insert current date | ||
nnoremap <Leader>d "=strftime("(%d %b %Y)")<CR>Pbb~f)a<CR><CR><Esc>k | ||
" insert current time | ||
nnoremap <Leader>t "=strftime("(%H:%M)")<CR>Pbb~f)a<CR><CR><Esc>k | ||
" lookup using Dash.app | ||
nnoremap <Leader>, :Dash<CR> | ||
" command mode | ||
cnoremap <C-a> <Home> | ||
cnoremap <Esc>b <S-Left> | ||
cnoremap <Esc>f <S-Right> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
" Highlight 'git commit' contents. | ||
autocmd BufNewFile,BufRead COMMIT_EDITMSG set filetype=gitcommit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
autocmd Filetype html,xml,xsl source ~/etc/vim/bundle/closetag.vim/plugin/closetag.vim | ||
autocmd FileType html setlocal ts=2 sw=2 sts=2 | ||
|
||
" additional mappings for closetag.vim | ||
inoremap <C-c> <C-R>=GetCloseTag()<CR> | ||
map <C-c> a<C-_><ESC> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
autocmd Filetype javascript setlocal shiftwidth=2 tabstop=2 softtabstop=2 | ||
autocmd BufNewFile,BufRead .eslintrc set filetype=javascript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
autocmd FileType make setlocal noexpandtab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
" Run current perl test. | ||
autocmd Filetype javascript nnoremap <LocalLeader>t :!prove -v %<CR> | ||
autocmd Filetype perl nnoremap <LocalLeader>t :!prove -v %<CR> | ||
" Search for perl modules in ./lib on 'gf'. | ||
set path+=lib | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
set runtimepath^=~/etc/vim | ||
|
||
set nocompatible " nobody cares about stupid classic vi | ||
filetype off | ||
|
||
" set the runtime path to include Vundle and initialize | ||
set runtimepath+=~/etc/vim/bundle/Vundle.vim | ||
call vundle#begin('~/etc/vim/bundle') | ||
let g:vundle_default_git_proto = 'git' | ||
|
||
Plugin 'gmarik/Vundle.vim' | ||
|
||
Plugin 'closetag.vim' | ||
Plugin 'kchmck/vim-coffee-script' | ||
Plugin 'tpope/vim-fugitive' | ||
Plugin 'airblade/vim-gitgutter' | ||
Plugin 'othree/html5.vim' | ||
Plugin 'perl-support.vim' | ||
Plugin 'pangloss/vim-javascript' | ||
Plugin 'kchmck/vim-coffee-script' | ||
Plugin 'mxw/vim-jsx' | ||
Plugin 'vim-perl/vim-perl' | ||
Plugin 'hynek/vim-python-pep8-indent' | ||
|
||
Plugin 'godlygeek/tabular' " required by vim-markdown | ||
Plugin 'plasticboy/vim-markdown' | ||
|
||
Plugin 'tpope/vim-fugitive' | ||
Plugin 'airblade/vim-gitgutter' | ||
|
||
Plugin 'scrooloose/syntastic' | ||
let g:syntastic_check_on_open = 1 | ||
let g:syntastic_javascript_checkers = ["eslint", "jshint"] | ||
|
||
Plugin 'rizzatti/dash.vim' | ||
|
||
call vundle#end() | ||
filetype plugin indent on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters