some vim improvements
* add vim-ack * define ,+w to open window verticaly * add set relativenumber * add set gdefault
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -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
|
||||
|
||||
1
.vim/bundle/ack.vim
Submodule
1
.vim/bundle/ack.vim
Submodule
Submodule .vim/bundle/ack.vim added at eede0425f5
18
.vimrc
18
.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 <C-k> <C-W>k
|
||||
map <C-h> <C-W>h
|
||||
map <C-l> <C-W>l
|
||||
|
||||
" open window verticaly
|
||||
nnoremap <leader>w <C-w>v<C-w>l
|
||||
|
||||
" Close the current buffer
|
||||
map <leader>bd :Bclose<cr>
|
||||
|
||||
@@ -251,6 +263,9 @@ endfunc
|
||||
autocmd BufWrite *.py :call DeleteTrailingWS()
|
||||
autocmd BufWrite *.coffee :call DeleteTrailingWS()
|
||||
|
||||
" mapping for ack
|
||||
nnoremap <leader>a :Ack
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => vimgrep searching and cope displaying
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
@@ -338,6 +353,9 @@ set pastetoggle=<F1>
|
||||
" 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()
|
||||
|
||||
@@ -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!
|
||||
|
||||
Reference in New Issue
Block a user