Forráskód Böngészése

Mayor restructure of vimrc, trying to use tmux now

Kevin Heinicke 8 éve
szülő
commit
d8e7c4bef2
6 módosított fájl, 41 hozzáadás és 11 törlés
  1. 3 0
      .gitmodules
  2. 1 0
      external/tpm
  3. 1 1
      external/vim-plug
  4. 13 10
      nvimrc
  5. 18 0
      tmux.conf
  6. 5 0
      zshrc

+ 3 - 0
.gitmodules

@@ -7,3 +7,6 @@
 [submodule "external/prezto"]
 	path = external/prezto
 	url = git@github.com:bixel/prezto.git
+[submodule "external/tpm"]
+	path = external/tpm
+	url = https://github.com/tmux-plugins/tpm.git

+ 1 - 0
external/tpm

@@ -0,0 +1 @@
+Subproject commit 0ea31ae2d624413719e97dc7e138ed6cf749c7d2

+ 1 - 1
external/vim-plug

@@ -1 +1 @@
-Subproject commit f666048052fa71746161cf7eb780698804bf13b2
+Subproject commit 5fc9eab788608fb4adcb07a8d79354dcafefaa6a

+ 13 - 10
nvimrc

@@ -5,37 +5,35 @@ Plug 'Valloric/YouCompleteMe'
 Plug 'majutsushi/tagbar'
 Plug 'scrooloose/nerdtree'
 Plug 'tpope/vim-fugitive'
-Plug 'rust-lang/rust.vim'
+Plug 'tpope/vim-sensible'
 Plug 'airblade/vim-gitgutter'
 Plug 'mhinz/vim-startify'
 " Define runtime-path (rtp) if there is no explicit repo for vim
-Plug 'chriskempson/tomorrow-theme', {'rtp': 'vim/'}
 Plug 'altercation/vim-colors-solarized'
 Plug 'vim-airline/vim-airline'
 Plug 'vim-airline/vim-airline-themes'
 Plug 'terryma/vim-multiple-cursors'
 Plug 'suan/vim-instant-markdown'
+Plug 'godlygeek/tabular'
 Plug 'tpope/vim-markdown'
 Plug 'KabbAmine/vCoolor.vim'
 Plug 'nvie/vim-flake8'
-Plug 'Raimondi/delimitMate'
 Plug 'SirVer/ultisnips'
-Plug 'rizzatti/dash.vim'
 Plug 'octol/vim-cpp-enhanced-highlight'
 Plug 'junegunn/goyo.vim'
 Plug 'junegunn/limelight.vim'
 Plug 'lervag/vimtex'
 Plug 'ap/vim-css-color'
-" Plug 'gilligan/vim-lldb'
-Plug 'critiqjo/lldb.nvim'
 Plug 'mattn/emmet-vim'
 Plug 'ctrlpvim/ctrlp.vim'
-Plug 'scrooloose/nerdcommenter'
+"Plug 'scrooloose/nerdcommenter'
+Plug 'tpope/vim-commentary'
 Plug 'pangloss/vim-javascript'
 Plug 'easymotion/vim-easymotion'
 Plug 'tpope/vim-unimpaired'
 Plug 'othree/yajs.vim'
 Plug 'tpope/vim-surround'
+Plug 'christoomey/vim-tmux-navigator'
 
 " All of your Plugins must be added before the following line
 call plug#end()  " required
@@ -46,7 +44,6 @@ call plug#end()  " required
 
 " Recursive file search
 set path+=**
-set wildmenu
 
 " Make watchdogs possible
 set backupcopy=yes
@@ -55,6 +52,12 @@ set backupcopy=yes
 map j gj
 map k gk
 
+" navigate split panes with ctrl-h/j/k/l
+nnoremap <c-j> <c-w>j
+nnoremap <c-k> <c-w>k
+nnoremap <c-l> <c-w>l
+nnoremap <c-h> <c-w>h
+
 set relativenumber  " aka :set rnu
 
 "map mapleader / to (german layout)
@@ -126,7 +129,6 @@ let NERDTreeIgnore = ['\.pyc$']
 set diffopt+=vertical
 
 " Airline stuff
-set laststatus=2
 let g:airline_powerline_fonts = 1
 let g:airline#extensions#tabline#enabled = 1
 let g:airline#extensions#tabline#buffer_nr_show = 1
@@ -150,10 +152,11 @@ let g:vcool_ins_rgba_map = ''  " Insert rgba color.
 " vim-javascript config
 let g:javascript_enable_domhtmlcss = 1
 
-" limelight+goyo settings
+" limelight+goyo settings, automatically fire up limelight with goyo
 let g:limelight_conceal_ctermfg = 'gray'
 autocmd! User GoyoEnter Limelight
 autocmd! User GoyoLeave Limelight!
+" map `,g` to start goyo
 nnoremap <leader>g :Goyo<CR>
 
 " Enable emmet-vim just for html/css

+ 18 - 0
tmux.conf

@@ -1 +1,19 @@
 set -g mouse on
+
+# List of plugins
+set -g @plugin 'tmux-plugins/tpm'
+set -g @plugin 'tmux-plugins/tmux-sensible'
+set -g @plugin 'christoomey/vim-tmux-navigator'
+
+# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
+run '~/.dotfiles/external/tpm/tpm'
+
+# Clear the pane and it's history
+bind -n C-k send-keys C-l \; clear-history
+
+# smart pane switching with awareness of vim splits
+bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
+bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
+bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
+bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
+bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"

+ 5 - 0
zshrc

@@ -1,3 +1,8 @@
+# instantaneously start tmux, if available
+if command -v tmux>/dev/null; then
+  [[ ! $TERM =~ screen ]] && [ -z $TMUX ] && exec tmux
+fi
+
 # Device-specifig setup (ignored by git)
 # source local config first to overwrite default theme if wanted
 source ~/.zsh_local