some vim improvements

* add vim-ack
* define ,+w to open window verticaly
* add set relativenumber
* add set gdefault
This commit is contained in:
2016-08-09 20:46:50 +02:00
parent f536830bf9
commit 74e4d49347
4 changed files with 23 additions and 0 deletions

3
.gitmodules vendored
View File

@@ -37,3 +37,6 @@
[submodule ".vim/bundle/nerdtree-git-plugin"] [submodule ".vim/bundle/nerdtree-git-plugin"]
path = .vim/bundle/nerdtree-git-plugin path = .vim/bundle/nerdtree-git-plugin
url = https://github.com/Xuyuanp/nerdtree-git-plugin.git 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

1
.vim/bundle/ack.vim Submodule

Submodule .vim/bundle/ack.vim added at eede0425f5

18
.vimrc
View File

@@ -60,6 +60,9 @@ set smartcase
" Highlight search results " Highlight search results
set hlsearch set hlsearch
" Applies substitutions globally on lines
set gdefault
" Makes search act like search in modern browsers " Makes search act like search in modern browsers
set incsearch set incsearch
@@ -144,6 +147,12 @@ set tw=500
set si "Smart indent set si "Smart indent
set wrap "Wrap lines set wrap "Wrap lines
" wrap settings
"set wrap
"set textwidth=79
"set formatoptions=qrn1
"set colorcolumn=85
"set listchars to show special characters "set listchars to show special characters
set list set list
set listchars=tab:\┆\ ,trail:.,precedes:←,extends:→,nbsp:.,eol,space:⋅ set listchars=tab:\┆\ ,trail:.,precedes:←,extends:→,nbsp:.,eol,space:⋅
@@ -180,6 +189,9 @@ map <C-k> <C-W>k
map <C-h> <C-W>h map <C-h> <C-W>h
map <C-l> <C-W>l map <C-l> <C-W>l
" open window verticaly
nnoremap <leader>w <C-w>v<C-w>l
" Close the current buffer " Close the current buffer
map <leader>bd :Bclose<cr> map <leader>bd :Bclose<cr>
@@ -251,6 +263,9 @@ endfunc
autocmd BufWrite *.py :call DeleteTrailingWS() autocmd BufWrite *.py :call DeleteTrailingWS()
autocmd BufWrite *.coffee :call DeleteTrailingWS() autocmd BufWrite *.coffee :call DeleteTrailingWS()
" mapping for ack
nnoremap <leader>a :Ack
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => vimgrep searching and cope displaying " => vimgrep searching and cope displaying
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@@ -338,6 +353,9 @@ set pastetoggle=<F1>
" Define Mouse Mode " Define Mouse Mode
"set mouse=a "set mouse=a
" show relative line numbers
set relativenumber
" run pathogen to manage your 'runtimepath' with ease. (https://github.com/tpope/vim-pathogen) " 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. " In practical terms, pathogen.vim makes it super easy to install plugins and runtime files in their own private directories.
execute pathogen#infect() execute pathogen#infect()

View File

@@ -75,6 +75,7 @@ For easy update the complete dotfiles (inlc. all submodules) you can use *udot*
### macOS ### 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: 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 * [tmux-urlview](https://github.com/tmux-plugins/tmux-urlview): brew install urlview extract_url
* [Ack](http://beyondgrep.com/): brew install ack
## Feedback ## Feedback
Suggestions, corrections or improvements are welcome! Suggestions, corrections or improvements are welcome!