Update tmux.conf, vimrc and zshrc
This commit is contained in:
parent
727f51cd1b
commit
297a770694
|
@ -6,6 +6,7 @@ set-window-option -g automatic-rename off
|
||||||
set-window-option -g allow-rename off
|
set-window-option -g allow-rename off
|
||||||
set-option -g set-titles on
|
set-option -g set-titles on
|
||||||
|
|
||||||
|
set-window-option -g mode-keys vi
|
||||||
set -g status-keys vi
|
set -g status-keys vi
|
||||||
set -g history-limit 10000
|
set -g history-limit 10000
|
||||||
set -g escape-time 0
|
set -g escape-time 0
|
||||||
|
|
57
vimrc
57
vimrc
|
@ -1,13 +1,14 @@
|
||||||
syntax on
|
syntax on
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
|
|
||||||
" Make comma the leader key
|
|
||||||
let mapleader=","
|
let mapleader=","
|
||||||
|
|
||||||
" file browser
|
" netrw
|
||||||
let g:netrw_banner = 0
|
let g:netrw_banner = 0
|
||||||
let g:netrw_liststyle = 1
|
let g:netrw_liststyle = 1
|
||||||
let g:netrw_list_hide = '^\.'
|
let g:netrw_list_hide = '^\.'
|
||||||
|
let g:netrw_winsize=25
|
||||||
|
map <leader>n <esc>:Lexplore<cr>
|
||||||
|
|
||||||
set shiftwidth=2
|
set shiftwidth=2
|
||||||
set shiftround
|
set shiftround
|
||||||
|
@ -18,7 +19,7 @@ set encoding=utf-8
|
||||||
set nocompatible
|
set nocompatible
|
||||||
set t_Co=256
|
set t_Co=256
|
||||||
set hidden
|
set hidden
|
||||||
set history=100
|
set history=1000
|
||||||
set nowrap
|
set nowrap
|
||||||
set smartindent
|
set smartindent
|
||||||
set copyindent
|
set copyindent
|
||||||
|
@ -43,7 +44,6 @@ set noerrorbells
|
||||||
set nobackup
|
set nobackup
|
||||||
set noswapfile
|
set noswapfile
|
||||||
set clipboard=unnamed
|
set clipboard=unnamed
|
||||||
set pastetoggle=<F2>
|
|
||||||
set ttymouse=sgr
|
set ttymouse=sgr
|
||||||
set mouse=a
|
set mouse=a
|
||||||
set mousemodel=popup_setpos
|
set mousemodel=popup_setpos
|
||||||
|
@ -53,9 +53,13 @@ set timeoutlen=600
|
||||||
set ballooneval
|
set ballooneval
|
||||||
set balloonevalterm
|
set balloonevalterm
|
||||||
set scrolloff=5
|
set scrolloff=5
|
||||||
|
set dict=/usr/share/dict/words
|
||||||
|
set shortmess+=I
|
||||||
|
" See :help thesaurus
|
||||||
|
set thesaurus=$HOME/Documents/thesaurus/thesaurus_pkg/thesaurus.txt
|
||||||
|
|
||||||
" Colour scheme:
|
" Colour scheme:
|
||||||
colorscheme PaperColor
|
colorscheme iceberg
|
||||||
set background=dark
|
set background=dark
|
||||||
|
|
||||||
" Key mappings:
|
" Key mappings:
|
||||||
|
@ -66,22 +70,46 @@ map <up> <nop>
|
||||||
map <down> <nop>
|
map <down> <nop>
|
||||||
map <left> <nop>
|
map <left> <nop>
|
||||||
map <right> <nop>
|
map <right> <nop>
|
||||||
map <leader>n :Ntree<cr>
|
|
||||||
map <c-t> <esc>:tabnew<cr>
|
map <c-t> <esc>:tabnew<cr>
|
||||||
" Select just-pasted text:
|
" Select just-pasted text:
|
||||||
nnoremap <Leader>p `[v`]
|
nnoremap <Leader>0 `[v`]
|
||||||
nnoremap Q @@
|
nnoremap Q @@
|
||||||
|
map <silent> <leader>p <esc>:set paste<cr>a
|
||||||
|
map <silent> <leader>P <esc>:set nopaste<cr>
|
||||||
|
|
||||||
|
|
||||||
|
function! ToggleQuickFix()
|
||||||
|
if empty(filter(getwininfo(), 'v:val.quickfix'))
|
||||||
|
copen
|
||||||
|
else
|
||||||
|
cclose
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
map <silent> <leader>q <esc>:call ToggleQuickFix()<cr>
|
||||||
|
|
||||||
" vim-markdown configuration:
|
" vim-markdown configuration:
|
||||||
let g:vim_markdown_conceal = 3
|
let g:vim_markdown_conceal = 3
|
||||||
|
|
||||||
" Command-T configuration:
|
" Command-T configuration:
|
||||||
|
let switchbuf="usetab"
|
||||||
map <leader>T :CommandTFlush<CR>
|
map <leader>T :CommandTFlush<CR>
|
||||||
|
map <Leader>r :CommandTMRU<CR>
|
||||||
|
map <Leader>H :CommandTHelp<CR>
|
||||||
|
map <Leader>c :CommandTCommand<CR>
|
||||||
|
map <leader>m :marks<cr>
|
||||||
|
map <leader>R :registers<cr>
|
||||||
|
map <leader>v :vsplit<cr>
|
||||||
|
map <leader>h :split<cr>file browser
|
||||||
|
map <leader>! <esc>:only<cr>
|
||||||
let g:CommandTFileScanner="git"
|
let g:CommandTFileScanner="git"
|
||||||
let g:CommandTGitScanSubmodules=1
|
let g:CommandTGitScanSubmodules=1
|
||||||
let g:CommandTGitIncludeUntracked=1
|
let g:CommandTGitIncludeUntracked=1
|
||||||
let g:CommandTMatchWindowAtTop=0
|
let g:CommandTMatchWindowAtTop=0
|
||||||
let g:CommandTMaxHeight=10
|
let g:CommandTMaxHeight=20
|
||||||
|
" See :h command-t-faq
|
||||||
|
if &term =~ "xterm" || &term =~ "screen"
|
||||||
|
let g:CommandTCancelMap = ['<ESC>', '<C-c>']
|
||||||
|
end
|
||||||
|
|
||||||
" Lightline configuration:
|
" Lightline configuration:
|
||||||
set laststatus=2
|
set laststatus=2
|
||||||
|
@ -125,7 +153,10 @@ map <Leader>f :ALEFindReferences<CR>
|
||||||
map <Leader>fv :ALEFindReferences -vsplit<CR>
|
map <Leader>fv :ALEFindReferences -vsplit<CR>
|
||||||
map <Leader>fh :ALEFindReferences -split<CR>
|
map <Leader>fh :ALEFindReferences -split<CR>
|
||||||
map <Leader>ft :ALEFindReferences -tab<CR>
|
map <Leader>ft :ALEFindReferences -tab<CR>
|
||||||
map <Leader>r :ALERename<CR>
|
command GoToDefinition ALEGoToDefinition
|
||||||
|
command GoToTypeDefinition ALEGoToTypeDefinition
|
||||||
|
command FindReferences ALEFindReferences
|
||||||
|
command Rename ALERename
|
||||||
|
|
||||||
let g:ale_sign_column_always = 1
|
let g:ale_sign_column_always = 1
|
||||||
let g:ale_fix_on_save = 1
|
let g:ale_fix_on_save = 1
|
||||||
|
@ -140,7 +171,7 @@ let g:ale_set_balloons = 1
|
||||||
let g:ale_rust_analyzer_config = {
|
let g:ale_rust_analyzer_config = {
|
||||||
\ 'diagnostics': { 'disabled': ['unresolved-import'] },
|
\ 'diagnostics': { 'disabled': ['unresolved-import'] },
|
||||||
\ 'cargo': { 'loadOutDirsFromCheck': v:true },
|
\ 'cargo': { 'loadOutDirsFromCheck': v:true },
|
||||||
\ 'procMacro': { 'enable': v:false },
|
\ 'procMacro': { 'enable': v:true },
|
||||||
\ 'checkOnSave': { 'command': 'clippy', 'enable': v:true },
|
\ 'checkOnSave': { 'command': 'clippy', 'enable': v:true },
|
||||||
\ }
|
\ }
|
||||||
let g:ale_go_goimports_options = '-local github.com/sensiblecodeio/cantabular'
|
let g:ale_go_goimports_options = '-local github.com/sensiblecodeio/cantabular'
|
||||||
|
@ -153,13 +184,15 @@ let g:ale_history_log_output = 1
|
||||||
let g:ale_linters = {
|
let g:ale_linters = {
|
||||||
\ 'javascript': ['eslint'],
|
\ 'javascript': ['eslint'],
|
||||||
\ 'go': ['gopls'],
|
\ 'go': ['gopls'],
|
||||||
\ 'rust': ['analyzer']
|
\ 'rust': ['analyzer'],
|
||||||
|
\ 'css': ['stylelint'],
|
||||||
\ }
|
\ }
|
||||||
let g:ale_fixers = {
|
let g:ale_fixers = {
|
||||||
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
|
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
|
||||||
\ 'javascript': ['prettier'],
|
\ 'javascript': ['prettier'],
|
||||||
\ 'rust': [],
|
\ 'rust': [],
|
||||||
\ 'go': []
|
\ 'go': [],
|
||||||
|
\ 'css': ['stylelint'],
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
" load ALE only after configured:
|
" load ALE only after configured:
|
||||||
|
|
8
zshrc
8
zshrc
|
@ -146,3 +146,11 @@ fi
|
||||||
|
|
||||||
# For Ubuntu, disable Caps-Lock:
|
# For Ubuntu, disable Caps-Lock:
|
||||||
setxkbmap -option caps:none
|
setxkbmap -option caps:none
|
||||||
|
|
||||||
|
# Vim keymap
|
||||||
|
bindkey -v
|
||||||
|
bindkey '^P' up-history
|
||||||
|
bindkey '^N' down-history
|
||||||
|
bindkey '^w' backward-kill-word
|
||||||
|
bindkey '^r' history-incremental-search-backward
|
||||||
|
export KEYTIMEOUT=2
|
||||||
|
|
Loading…
Reference in New Issue