aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhumphreylin <[email protected]>2019-08-13 03:17:48 +0000
committerhumphreylin <[email protected]>2019-08-13 03:17:48 +0000
commitfc3222197acafba3044ea8138edaf7b701fa5565 (patch)
tree2e83ed918820260be3a851434833e04e87ab747c
parent72b32c3beba27d7e5dd4f3b6b34dca6d0392adc7 (diff)
downloaddotfiles-fc3222197acafba3044ea8138edaf7b701fa5565.tar.gz
dotfiles-fc3222197acafba3044ea8138edaf7b701fa5565.tar.bz2
dotfiles-fc3222197acafba3044ea8138edaf7b701fa5565.zip
set vim mode on tmux and add some key binding in vim
-rw-r--r--.tmux.conf7
-rw-r--r--.vimrc4
2 files changed, 10 insertions, 1 deletions
diff --git a/.tmux.conf b/.tmux.conf
index 760637a..b2e3fff 100644
--- a/.tmux.conf
+++ b/.tmux.conf
@@ -2,6 +2,13 @@
unbind ^b
set -g prefix 'M-`'
+# vim mode
+setw -g mode-keys vi
+
+# copy and paste like vim
+bind -T copy-mode-vi 'v' send -X begin-selection
+bind -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
+
# swtich between pane
bind h select-pane -L
bind j select-pane -D
diff --git a/.vimrc b/.vimrc
index d168226..03bf64f 100644
--- a/.vimrc
+++ b/.vimrc
@@ -12,7 +12,6 @@ set shiftwidth=4
set expandtab
set softtabstop=4
-set textwidth=80
set wrap
"set nowrap
"set wrapmargin=4
@@ -31,6 +30,8 @@ set autoread
set wildmenu
set wildmode=longest:list,full
+set backspace=indent,eol,start
+
" mapping
let mapleader=',' " change the key <leader>
nnoremap <leader>n :bn<CR>
@@ -58,3 +59,4 @@ call plug#end()
colorscheme molokai
let g:airline='molokai'
let g:airline#extensions#tabline#enabled = 1
+map <C-n> :NERDTreeToggle<CR>