diff --git a/_bashrc b/_bashrc index eb132c4..f74e1f2 100644 --- a/_bashrc +++ b/_bashrc @@ -61,58 +61,6 @@ xterm*|rxvt*) ;; esac -# TODO delete if it is still commented in few months (2018-09-13) -# Set up TERM variables. -# vt100 and xterm have no color in vim (at least on unixs), but if we call them xterm-color, they will. -# (vt100 for F-Secure SSH.) -# This may well be the case for some other terms, so I'm putting them here. -# Also set up a variable to indicate whether to set up the title functions. -# TODO gnome-terminal, or however it reports itself -# case $TERM in - -# screen) -# TERM_IS_COLOR=true -# TERM_NOT_RECOGNIZED_AS_COLOR_BY_VIM=false -# TERM_NOT_RECOGNIZED_BY_SUN_UTILS=false -# TERM_CAN_TITLE=true -# ;; - -# xterm-color|color_xterm|rxvt|Eterm|screen*) # screen.linux|screen-w -# TERM_IS_COLOR=true -# TERM_NOT_RECOGNIZED_AS_COLOR_BY_VIM=false -# TERM_NOT_RECOGNIZED_BY_SUN_UTILS=true -# TERM_CAN_TITLE=true -# ;; - -# linux) -# TERM_IS_COLOR=true -# TERM_NOT_RECOGNIZED_AS_COLOR_BY_VIM=false -# TERM_NOT_RECOGNIZED_BY_SUN_UTILS=true -# TERM_CAN_TITLE=false -# ;; - -# xterm|vt100) -# TERM_IS_COLOR=true -# TERM_NOT_RECOGNIZED_AS_COLOR_BY_VIM=true -# TERM_NOT_RECOGNIZED_BY_SUN_UTILS=false -# TERM_CAN_TITLE=true -# ;; - -# *xterm*|eterm|rxvt*) -# TERM_IS_COLOR=true -# TERM_NOT_RECOGNIZED_AS_COLOR_BY_VIM=true -# TERM_NOT_RECOGNIZED_BY_SUN_UTILS=true -# TERM_CAN_TITLE=true -# ;; - -# *) -# TERM_IS_COLOR=false -# TERM_NOT_RECOGNIZED_AS_COLOR_BY_VIM=false -# TERM_NOT_RECOGNIZED_BY_SUN_UTILS=false -# TERM_CAN_TITLE=false -# ;; - -# esac # ----------- End of previous section ---------------- # function to an npm bin to $PATH @@ -167,7 +115,7 @@ else fi # remap caps lock to escape -[[ -x $(command -v setxkbmap) ]] && setxkbmap -option "caps:swapescape" +# [[ -x $(command -v setxkbmap) ]] && setxkbmap -option "caps:swapescape" # Set my GPG key export GPGKEY=2F74DA04 diff --git a/_vimrc b/_vimrc index afe6178..eff3998 100644 --- a/_vimrc +++ b/_vimrc @@ -82,8 +82,8 @@ if has("nvim-0.3.0") inoremap pumvisible() ? "\" : "\u\" " Use `[c` and `]c` for navigate diagnostics - nmap [c (coc-diagnostic-prev) - nmap ]c (coc-diagnostic-next) + nmap (coc-diagnostic-prev) + nmap (coc-diagnostic-next) " Remap keys for gotos nmap gd (coc-definition) @@ -132,6 +132,19 @@ if has("nvim-0.3.0") command! -nargs=? CocFold :call CocAction('fold', ) command! -nargs=0 CocPrettier :CocCommand prettier.formatFile + " Using CocList + " Show all diagnostics + nnoremap d :CocList diagnostics + " Manage extensions + nnoremap e :CocList extensions + " Show commands + nnoremap c :CocList commands + " Find symbol of current document + nnoremap o :CocList outline + " Search workspace symbols + nnoremap s :CocList -I symbols + " Resume latest coc list + nnoremap p :CocListResume endif "*****************************************************************************" @@ -246,13 +259,9 @@ set title set titleold="Terminal" set titlestring=%F -function! ShortFilename() abort - return pathshorten(expand("%")) -endfunction - " Statusline definition set statusline= " Clear -set statusline+=%{ShortFilename()} " Tail of the filename +set statusline+=%{pathshorten(expand('%'))} " Tail of the filename set statusline+=%h " Help file flag set statusline+=%r " Read only flag set statusline+=%m " Modified flag @@ -347,6 +356,9 @@ command! -nargs=+ -complete=file Agraw call fzf#vim#ag_raw() "***************************************************************************** " Mappings "***************************************************************************** +" Remap escape +imap ii + " Edit my nvim configuration nnoremap vo :vsplit $MYVIMRC " Reload nvim configuration @@ -381,6 +393,7 @@ nnoremap fh :History nnoremap fb :Buffers nnoremap fl :Lines nnoremap ff :Files +nnoremap :Files nnoremap fc :Commits noremap fw :exe ':Ag ' . expand('') noremap f :Ag