get vim-codequery working for searching large codebases, set specific zshrc keybindings for centos

master
Paul Walko 2018-06-12 16:58:52 -04:00
parent 1984ecc66a
commit e7fff44ee5
2 changed files with 27 additions and 6 deletions

18
vimrc
View File

@ -6,11 +6,15 @@ call plug#begin('~/.vim/plugged')
Plug 'whatyouhide/vim-gotham' Plug 'whatyouhide/vim-gotham'
Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes' Plug 'vim-airline/vim-airline-themes'
Plug 'Shougo/unite.vim'
Plug 'devjoe/vim-codequery'
Plug 'mileszs/ack.vim'
call plug#end() call plug#end()
"""" General Settings """" General Settings
"" leader "" leader
let mapleader="," let mapleader=","
"" vim-airline "" vim-airline
if !exists('g:airline_symbols') if !exists('g:airline_symbols')
let g:airline_symbols = {} let g:airline_symbols = {}
@ -36,11 +40,21 @@ let g:airline_symbols.notexists = '∄'
let g:airline_symbols.whitespace = 'Ξ' let g:airline_symbols.whitespace = 'Ξ'
let g:airline_theme='jellybeans' let g:airline_theme='jellybeans'
"" vim-codequery
nnoremap <leader>c :CodeQueryMenu Unite Full<CR>
nnoremap <leader>s :CodeQuery Symbol<CR>
nnoremap <leader>l :CodeQuery Call<CR>
nnoremap <leader>r :CodeQuery Caller<CR>
nnoremap <leader>e :CodeQuery Callee<CR>
"" Set tabs to 4 spaces "" Set tabs to 4 spaces
set tabstop=4 set tabstop=4
set shiftwidth=4 set shiftwidth=4
set expandtab set expandtab
"" Stupid backspace setting
set backspace=2
"" Remember location in file "" Remember location in file
if has("autocmd") if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
@ -59,7 +73,9 @@ colorscheme gotham256
filetype plugin on filetype plugin on
"" Ctags "" Ctags
set tags+=tags;/ set path+=;/
set tags+=c_tags;/
" By default ^W ^] splits horizontal, so now ^] splits vertically
map <C-\> :vsp <CR>:exec("tag ".expand("<cword>"))<CR> map <C-\> :vsp <CR>:exec("tag ".expand("<cword>"))<CR>
"" Window stuff "" Window stuff

15
zshrc
View File

@ -7,6 +7,7 @@ else
export TERM='screen-256color' export TERM='screen-256color'
fi fi
### For local binaries (vim 8) ### For local binaries (vim 8)
export PATH=$HOME/.local/bin:$PATH export PATH=$HOME/.local/bin:$PATH
@ -32,14 +33,18 @@ export GPG_TTY=$(tty)
# Reduce delay swithing between normal & insert mode # Reduce delay swithing between normal & insert mode
export KEYTIMEOUT=1 export KEYTIMEOUT=1
# Use vim cli mode # Keybindings
bindkey '^K' history-beginning-search-backward bindkey '^K' history-beginning-search-backward
bindkey '^J' history-beginning-search-forward bindkey '^J' history-beginning-search-forward
# ctrl-w removed word backwards
bindkey '^w' backward-kill-word 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 ## Dircolors
eval `dircolors ~/.config/dircolors-solarized/dircolors.256dark` eval `dircolors ~/.config/dircolors-solarized/dircolors.256dark`
echo 'CA' | cowsay