aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vimrc41
-rw-r--r--zshrc3
2 files changed, 31 insertions, 13 deletions
diff --git a/vimrc b/vimrc
index 63a51ba..11f4203 100644
--- a/vimrc
+++ b/vimrc
@@ -10,24 +10,41 @@ set exrc
set secure
set title
+set hidden
+set undofile
+set undodir=~/.cache/vim-undo//
+set hlsearch
+set foldmethod=syntax
+
+" GitGutterEnable
+
function InitBase()
- set tabstop=4
- set softtabstop=4
- set shiftwidth=4
- set noexpandtab
set number
- set hidden
- set undofile
- set undodir=~/.cache/vim-undo//
set colorcolumn=82
set textwidth=82
highlight ColorColumn ctermbg=darkgray
- set hlsearch
-
- set foldmethod=syntax
+endfunction
- execute 'GitGutterEnable'
+" Tabs setting. In default we want 4 spaces tab, but allows also 8 spaced tabs
+set noexpandtab
+set tabstop=4
+set shiftwidth=4
+set softtabstop=4
+function TabToogle()
+ if &tabstop != 4
+ set tabstop=4
+ set shiftwidth=4
+ set softtabstop=4
+ echom 'Tab stop set to 4'
+ else
+ set tabstop=8
+ set shiftwidth=8
+ set softtabstop=8
+ echom 'Tab stop set to 8'
+ endif
+ " Soft tab stop is here only for posibility of expandtab
endfunction
+command TabToogle call TabToogle()
" Write as root
cmap w!! w !sudo tee >/dev/null %
@@ -75,8 +92,6 @@ function InitPython()
map <F3> :w<cr>
map <F4> :wa<cr>
nmap <F9> :TagbarOpen fc<cr>
-
- "execute 'NERDTree'
endfunction
function InitC()
diff --git a/zshrc b/zshrc
index b9c68d1..1ce5fdf 100644
--- a/zshrc
+++ b/zshrc
@@ -28,6 +28,9 @@ setopt hist_ignore_dups
unsetopt nomatch
bindkey -e
+autoload -U select-word-style
+select-word-style bash
+
# Delete key workaround
bindkey "^[[3~" delete-char
bindkey "^[3;5~" delete-char