From e7fff44ee5107bd5d5814fd107e23b0d06607ba6 Mon Sep 17 00:00:00 2001 From: Paul Walko Date: Tue, 12 Jun 2018 16:58:52 -0400 Subject: [PATCH] get vim-codequery working for searching large codebases, set specific zshrc keybindings for centos --- vimrc | 18 +++++++++++++++++- zshrc | 15 ++++++++++----- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/vimrc b/vimrc index e76322e..58cc47c 100644 --- a/vimrc +++ b/vimrc @@ -6,11 +6,15 @@ call plug#begin('~/.vim/plugged') Plug 'whatyouhide/vim-gotham' Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' +Plug 'Shougo/unite.vim' +Plug 'devjoe/vim-codequery' +Plug 'mileszs/ack.vim' call plug#end() """" General Settings "" leader let mapleader="," + "" vim-airline if !exists('g:airline_symbols') let g:airline_symbols = {} @@ -36,11 +40,21 @@ let g:airline_symbols.notexists = '∄' let g:airline_symbols.whitespace = 'Ξ' let g:airline_theme='jellybeans' +"" vim-codequery +nnoremap c :CodeQueryMenu Unite Full +nnoremap s :CodeQuery Symbol +nnoremap l :CodeQuery Call +nnoremap r :CodeQuery Caller +nnoremap e :CodeQuery Callee + "" Set tabs to 4 spaces set tabstop=4 set shiftwidth=4 set expandtab +"" Stupid backspace setting +set backspace=2 + "" Remember location in file if has("autocmd") au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif @@ -59,7 +73,9 @@ colorscheme gotham256 filetype plugin on "" Ctags -set tags+=tags;/ +set path+=;/ +set tags+=c_tags;/ +" By default ^W ^] splits horizontal, so now ^] splits vertically map :vsp :exec("tag ".expand("")) "" Window stuff diff --git a/zshrc b/zshrc index 8c41fda..0ab3ce5 100644 --- a/zshrc +++ b/zshrc @@ -7,6 +7,7 @@ else export TERM='screen-256color' fi + ### For local binaries (vim 8) export PATH=$HOME/.local/bin:$PATH @@ -32,14 +33,18 @@ export GPG_TTY=$(tty) # Reduce delay swithing between normal & insert mode export KEYTIMEOUT=1 -# Use vim cli mode +# Keybindings bindkey '^K' history-beginning-search-backward bindkey '^J' history-beginning-search-forward - -# ctrl-w removed word backwards bindkey '^w' backward-kill-word +if [ -f /etc/os-release ]; then + . /etc/os-release + if [ "$ID" = "rhel" ]; then + bindkey '\e[1~' beginning-of-line + bindkey '\e[4~' end-of-line + bindkey '\e[2~' insert-last-word + fi +fi ## Dircolors eval `dircolors ~/.config/dircolors-solarized/dircolors.256dark` - -echo 'CA' | cowsay