فهرست منبع

Merge branch 'master' of github.com:bixel/dotfiles

Kevin 5 سال پیش
والد
کامیت
10019d6b5f
5فایلهای تغییر یافته به همراه33 افزوده شده و 7 حذف شده
  1. 3 0
      Xmodmap
  2. 1 0
      gitignore_global
  3. 11 5
      nvimrc
  4. 7 1
      tmux.conf
  5. 11 1
      zshrc

+ 3 - 0
Xmodmap

@@ -2,3 +2,6 @@ clear lock
 keycode   9 = Caps_Lock NoSymbol Caps_Lock NoSymbol Caps_Lock
 keycode  66 = Escape NoSymbol Escape NoSymbol Escape
 add lock = Caps_Lock
+keycode  30 = u U u U U00FC U00DC
+keycode  32 = o O o O U00F6 U00D6 oslash Oslash
+keycode  38 = a A a A U00E4 U00C4

+ 1 - 0
gitignore_global

@@ -45,3 +45,4 @@ __pycache__/
 .clang
 toolchain.cmake
 livepreview/
+.env

+ 11 - 5
nvimrc

@@ -29,14 +29,15 @@ Plug 'ap/vim-css-color'
 Plug 'mattn/emmet-vim'
 Plug 'ctrlpvim/ctrlp.vim'
 Plug 'tpope/vim-commentary'
-Plug 'pangloss/vim-javascript'
+Plug 'pangloss/vim-javascript', { 'for': 'javacript' }
 Plug 'easymotion/vim-easymotion'
 Plug 'tpope/vim-unimpaired'
 Plug 'tpope/vim-surround'
 Plug 'christoomey/vim-tmux-navigator'
 Plug 'roxma/vim-tmux-clipboard'
 Plug 'Chiel92/vim-autoformat'
-Plug 'apple/swift', { 'rtp': 'utils/vim' }
+" Plug 'apple/swift', { 'rtp': 'utils/vim', 'for': 'swift', 'frozen': 'true' }
+Plug 'keith/swift.vim'
 Plug 'https://bitbucket.org/johanneskoester/snakemake.git', {'rtp': 'misc/vim/'}
 Plug 'junegunn/vim-easy-align'
 Plug 'glench/vim-jinja2-syntax'
@@ -106,9 +107,12 @@ set expandtab " use 'tabstop' spaces instead of tab
 set colorcolumn=80 " Bar hinting for 80 chars
 set breakindent "baby, yeah!
 set mouse=a " activate mouse support
-set ignorecase " ignore case while searching
 set relativenumber  " aka :set rnu
 
+" searching
+set ignorecase " ignore case while searching
+nnoremap <C-s> :set hlsearch!<CR>
+
 " autoformatting
 let g:formatter_python = ['yapf']
 let g:formatter_yapf_style = 'pep8'
@@ -205,13 +209,15 @@ let g:vimtex_compiler_latexmk={
 
 " use deoplete
 let g:deoplete#enable_at_startup = 1
-
+" close preview window after completion or on leave https://github.com/Shougo/deoplete.nvim/issues/115
+autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
 " deoplete tab-complete
 inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
-
 " deoplete clang completion
 let g:deoplete#sources#clang#clang_complete_database = '/net/nfshome/home/kheinicke/DevEnvironments/FTDevelopment/PHYS/PHYS_flavtagmaster/build.x86_64-centos7-gcc62-opt/'
 let g:deoplete#sources#clang#libclang_path = '/net/nfshome/home/kheinicke/.local/lib/libclang.so'
+" show docstring in preview window
+let g:deoplete#sources#jedi#show_docstring = 1
 
 " vimtex settings
 let g:vimtex_matchparen_enabled=0  " turn off folding to speed up things

+ 7 - 1
tmux.conf

@@ -2,6 +2,7 @@
 set -g @plugin 'tmux-plugins/tpm'
 set -g @plugin 'tmux-plugins/tmux-sensible'
 set -g @plugin 'christoomey/vim-tmux-navigator'
+set -g @plugin 'tmux-plugins/tmux-yank'
 
 # enable mouse support
 set -g mouse on
@@ -40,7 +41,12 @@ bind % split-window -h -c "#{pane_current_path}"
 bind c new-window -c "#{pane_current_path}"
 
 # Use vim keybindings in copy mode
-setw -g mode-keys vi
+set-window-option -g mode-keys vi
+unbind -T copy-mode-vi MouseDragEnd1Pane
+bind-key -T copy-mode-vi y send-keys -X copy-selection
+
+# prevent delayed escape key
+set -s escape-time 0
 
 # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
 run '~/.dotfiles/external/tpm/tpm'

+ 11 - 1
zshrc

@@ -84,7 +84,12 @@ mountremote () {
       mountpoint=$1-`echo $2 | sed -E "s/\///g"`
   fi
   mkdir -p $mountroot/$mountpoint
-  sshfs $1:$2 "$mountroot/$mountpoint" -o auto_cache,reconnect,volname=$mountpoint,no_readahead,noappledouble,nolocalcaches
+  if [[ $(uname -a) == *"Darwin"* ]]; then
+      # following line is apple-specific
+      sshfs $1:$2 "$mountroot/$mountpoint" -o auto_cache,reconnect,volname=$mountpoint,no_readahead,noappledouble,nolocalcaches
+  else
+      sshfs $1:$2 "$mountroot/$mountpoint" -o auto_cache,reconnect,no_readahead
+  fi
   unset mountroot
   unset mountpoint
 }
@@ -105,6 +110,11 @@ function tmux-num-sessions () {
     done
 }
 
+# help creating links to emails
+function murl () {
+    echo message://"%3c"$@"%3e"
+}
+
 # make the clipboard working on remote
 if [[ -n "$SSH_CLIENT" ]]; then
   SSH_IP=$(echo $SSH_CLIENT | awk '{print $1}')