Commit 183003a4 authored by Nelso Jost's avatar Nelso Jost

better vim-tmux integration; dropped vim-arline for vim-buffline

parent 9fcd2fa8
......@@ -126,13 +126,13 @@ alias diff="colordiff -u"
alias cdl='function _cdl(){ cd $1 ; ls ; };_cdl'
alias marp="/home/nelso/apps/marp/Marp"
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
alias vibashrc="nvim ~/.bashrc"
alias vitmuxrc="nvim ~/.tmux.conf"
alias tmuxrc="tmux source-file ~/.tmux.conf"
#alias tmux="TERM=screen-256color-bce tmux"
alias tmux="TERM=screen-256color tmux -2"
stty -ixon
......@@ -5,7 +5,9 @@ call plug#begin('~/.local/share/nvim/plugged')
Plug 'flazz/vim-colorschemes' " molokai, PaperColor, etc
Plug 'scrooloose/nerdcommenter' " toggle comments and so on
Plug 'vim-airline/vim-airline' " nice status bar
"Plug 'vim-airline/vim-airline' " nice status bar (but )
Plug 'ap/vim-buftabline'
Plug 'itchyny/lightline.vim'
Plug 'vimlab/split-term.vim' " better split neovim terminal
Plug 'mhinz/vim-sayonara' " smart buffer quitting
Plug 'majutsushi/tagbar' " show file tags (require ctags)
......@@ -20,6 +22,8 @@ Plug 'xolox/vim-colorscheme-switcher'
"Plug 'lvht/tagbar-markdown'
Plug 't4ku/marktag'
Plug 'octol/vim-cpp-enhanced-highlight'
Plug 'bkad/CamelCaseMotion'
Plug 'christoomey/vim-tmux-navigator'
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
"Plug 'davidhalter/jedi'
......@@ -32,11 +36,11 @@ Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
call plug#end()
" -----------------------------------------------------------------------
colorscheme nelsobaka
colorscheme molokai
behave mswin
set clipboard=unnamed
"set clipboard=unnamedplus
"set clipboard=unnamed
set clipboard=unnamedplus
set colorcolumn=80
set nowrap
......@@ -96,7 +100,7 @@ autocmd BufNewFile,BufReadPost *.ino,*.pde set filetype=cpp
" space enter insertion mode (<esc> still goes back to normal mode)
map <space> i
" disable ex mode
" disable ex mode (the 80's should stay in the 80's)
map Q <Nop>
let mapleader=","
......@@ -106,13 +110,13 @@ imap <F2> :TagbarToggle<CR>
nmap <F3> :NERDTreeToggle<CR>
nnoremap <C-e> :update<CR>:VimuxRunCommand "make"<CR>
nnoremap <c-d> :update<CR>:VimuxRunLastCommand<CR>
nnoremap <Leader>e :update<CR>:VimuxInterruptRunner<CR> :VimuxPromptCommand<CR>
nnoremap <c-e> :update<CR>:VimuxInterruptRunner<CR> :VimuxRunLastCommand<CR>
map <F8> :PrevColorScheme<CR>
map <F9> :NextColorScheme<CR>
map <F10> :ed ~/.config/nvim/init.vim<cr>
map <F12> :ed ~/.config/nvim/init.vim<cr>
" open terminal split [term-split.vim]
"map <C-t> :50VTerm<CR>
......@@ -132,12 +136,17 @@ smap <Return> <C-g><leader>c<space>
" delete previous word
" imap <C-BS> <C-W>
" fix backspace problems in some terminals
set backspace=indent,eol,start
" delete word under cursor
noremap <C-Space> ciw
inoremap <C-Space> <ESC>ciw
inoremap <C-d> <ESC>dd
noremap s ciw
" easy tab ident
vnoremap <Tab> >
vnoremap <S-Tab> <
......@@ -155,6 +164,25 @@ nnoremap <C-Down> 5+
inoremap <C-Up> <C-o>5-
inoremap <C-Down> <C-o>5+
map <silent> w <Plug>CamelCaseMotion_w
map <silent> b <Plug>CamelCaseMotion_b
map <silent> e <Plug>CamelCaseMotion_e
map <silent> ge <Plug>CamelCaseMotion_ge
sunmap w
sunmap b
sunmap e
sunmap ge
omap <silent> iw <Plug>CamelCaseMotion_iw
xmap <silent> iw <Plug>CamelCaseMotion_iw
omap <silent> ib <Plug>CamelCaseMotion_ib
xmap <silent> ib <Plug>CamelCaseMotion_ib
omap <silent> ie <Plug>CamelCaseMotion_ie
xmap <silent> ie <Plug>CamelCaseMotion_ie
nnoremap <silent> <C-Right> w
nnoremap <silent> <C-Left> b
" CTRL-Z is Undo; not in cmdline though
noremap <C-Z> u
inoremap <C-Z> <C-O> <Esc>
......@@ -315,7 +343,8 @@ let g:vim_markdown_folding_disabled = 1
noremap <silent> <Leader>w :call ToggleWrap()<CR>
function ToggleWrap()
function! ToggleWrap()
if &wrap
echo "Wrap OFF"
setlocal nowrap
......@@ -347,6 +376,9 @@ endfunction
autocmd BufWritePre * %s/\s\+$//e
" auto detect vim settings when config file is saved
autocmd! bufwritepost $MYVIMRC source $MYVIMRC
let g:tagbar_type_markdown = {
\ 'ctagstype' : 'markdown',
......@@ -356,3 +388,10 @@ let g:tagbar_type_markdown = {
\ 'k:Heading_L3'
\ ]
\ }
hi MatchParen cterm=none ctermbg=white ctermfg=blue
"highlight MatchParen term=underline cterm=underline gui=underline
set iskeyword-=_
......@@ -5,6 +5,8 @@ bind C-a send-prefix
unbind C-b
#setw -g utf8 on
#setw -g xterm-keys on
set -g default-terminal "screen-256color"
# Start windows and panes at 1, not 0
......@@ -24,9 +26,9 @@ bind -n S-Pagedown send-keys Pagedown
# send xterm keys to apps like vim
set-window-option -g xterm-keys on
bind-key s split-window -h -l 55
bind-key v split-window -v
bind-key C-q kill-server
bind-key s split-window -h -l 55 -c '#{pane_current_path}'
bind-key v split-window -v -c '#{pane_current_path}'
bind-key C-q kill-server
bind-key C-w kill-window
#run-shell ~/resurrect.tmux
......@@ -38,10 +40,28 @@ set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-processes '~python'
# Smart pane switching with awareness of Vim splits.
# See:
#is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
#| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
#bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
#bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
#bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
#bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
#bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
#bind-key -T copy-mode-vi C-h select-pane -L
#bind-key -T copy-mode-vi C-j select-pane -D
#bind-key -T copy-mode-vi C-k select-pane -U
#bind-key -T copy-mode-vi C-l select-pane -R
#bind-key -T copy-mode-vi C-\ select-pane -l
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'christoomey/vim-tmux-navigator'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment