From 74e4d4934788eef6e969f5c519502825abaf2707 Mon Sep 17 00:00:00 2001 From: Eragos Date: Tue, 9 Aug 2016 20:46:50 +0200 Subject: [PATCH] some vim improvements * add vim-ack * define ,+w to open window verticaly * add set relativenumber * add set gdefault --- .gitmodules | 3 +++ .vim/bundle/ack.vim | 1 + .vimrc | 18 ++++++++++++++++++ README.md | 1 + 4 files changed, 23 insertions(+) create mode 160000 .vim/bundle/ack.vim diff --git a/.gitmodules b/.gitmodules index 81e2ec5..8c1128b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -37,3 +37,6 @@ [submodule ".vim/bundle/nerdtree-git-plugin"] path = .vim/bundle/nerdtree-git-plugin url = https://github.com/Xuyuanp/nerdtree-git-plugin.git +[submodule ".vim/bundle/ack.vim"] + path = .vim/bundle/ack.vim + url = https://github.com/mileszs/ack.vim.git diff --git a/.vim/bundle/ack.vim b/.vim/bundle/ack.vim new file mode 160000 index 0000000..eede042 --- /dev/null +++ b/.vim/bundle/ack.vim @@ -0,0 +1 @@ +Subproject commit eede0425f50d92be89ee8fb4560a5afb707c2a54 diff --git a/.vimrc b/.vimrc index b1dde5d..2a9117c 100644 --- a/.vimrc +++ b/.vimrc @@ -60,6 +60,9 @@ set smartcase " Highlight search results set hlsearch +" Applies substitutions globally on lines +set gdefault + " Makes search act like search in modern browsers set incsearch @@ -144,6 +147,12 @@ set tw=500 set si "Smart indent set wrap "Wrap lines +" wrap settings +"set wrap +"set textwidth=79 +"set formatoptions=qrn1 +"set colorcolumn=85 + "set listchars to show special characters set list set listchars=tab:\┆\ ,trail:.,precedes:←,extends:→,nbsp:.,eol:¬,space:⋅ @@ -180,6 +189,9 @@ map k map h map l +" open window verticaly +nnoremap w vl + " Close the current buffer map bd :Bclose @@ -251,6 +263,9 @@ endfunc autocmd BufWrite *.py :call DeleteTrailingWS() autocmd BufWrite *.coffee :call DeleteTrailingWS() +" mapping for ack +nnoremap a :Ack + """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => vimgrep searching and cope displaying """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -338,6 +353,9 @@ set pastetoggle= " Define Mouse Mode "set mouse=a +" show relative line numbers +set relativenumber + " run pathogen to manage your 'runtimepath' with ease. (https://github.com/tpope/vim-pathogen) " In practical terms, pathogen.vim makes it super easy to install plugins and runtime files in their own private directories. execute pathogen#infect() diff --git a/README.md b/README.md index de145ce..edf519e 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ For easy update the complete dotfiles (inlc. all submodules) you can use *udot* ### macOS * tmux: To show mem, cpu, load stats, you have to install tmux-mem-cpu-load (https://github.com/thewtex/tmux-mem-cpu-load) * [tmux-urlview](https://github.com/tmux-plugins/tmux-urlview): brew install urlview extract_url +* [Ack](http://beyondgrep.com/): brew install ack ## Feedback Suggestions, corrections or improvements are welcome!