Fix hiccups in root setup
- Neovim - X login (fish) - YouCompleteMe
This commit is contained in:
@@ -2,5 +2,5 @@ set runtimepath^=~/.vim runtimepath+=~/.vim/after
|
|||||||
let &packpath = &runtimepath
|
let &packpath = &runtimepath
|
||||||
source ~/.vimrc
|
source ~/.vimrc
|
||||||
|
|
||||||
let g:python_host_prog = '/usr/lib/python2.7'
|
let g:python_host_prog = '/usr/lib/python3.7'
|
||||||
" let g:python3_host_prog = '/usr/lib/python3.5.zip'
|
" let g:python3_host_prog = '/usr/lib/python3.5.zip'
|
||||||
@@ -1,15 +1,19 @@
|
|||||||
# login to X {{{ #
|
# vim: fdm=marker ft=fish.go-template
|
||||||
|
|
||||||
|
# login to X [[[ #
|
||||||
|
|
||||||
|
{{ if eq .chezmoi.username "kevin" }}
|
||||||
if status is-login
|
if status is-login
|
||||||
if test -z "$DISPLAY" -a $XDG_VTNR = 1
|
if test -z "$DISPLAY" -a $XDG_VTNR = 1
|
||||||
exec startx -- -keeptty
|
exec startx -- -keeptty
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
set -x GPG_TTY (tty)
|
set -x GPG_TTY (tty)
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
# }}} login to X #
|
# ]]] login to X #
|
||||||
|
|
||||||
# fish-specific {{{ #
|
# fish-specific [[[ #
|
||||||
|
|
||||||
fish_vi_key_bindings
|
fish_vi_key_bindings
|
||||||
set -x EDITOR nvim
|
set -x EDITOR nvim
|
||||||
@@ -30,14 +34,14 @@ for fxn in (find $fish_fxn_dir -name '*.fish')
|
|||||||
source $fxn
|
source $fxn
|
||||||
end
|
end
|
||||||
abbr rf "chezmoi apply && source ~/.config/fish/config.fish"
|
abbr rf "chezmoi apply && source ~/.config/fish/config.fish"
|
||||||
abbr rfs "sync-shortcuts && chezmoi apply && source /home/kevin/.config/fish/key_abbr.fish > /dev/null"
|
abbr rfs "sync-shortcuts && chezmoi apply && source ~/.config/fish/key_abbr.fish > /dev/null"
|
||||||
abbr xf "fish_config"
|
abbr xf "fish_config"
|
||||||
abbr f. "cd .."
|
abbr f. "cd .."
|
||||||
abbr f.. "cd ../.."
|
abbr f.. "cd ../.."
|
||||||
|
|
||||||
# }}} fish-specific #
|
# ]]] fish-specific #
|
||||||
|
|
||||||
# universal var's {{{ #
|
# universal var's [[[ #
|
||||||
|
|
||||||
# spv
|
# spv
|
||||||
set -U spv_dir "/home/kevin/coding/spotify-lib-vis"
|
set -U spv_dir "/home/kevin/coding/spotify-lib-vis"
|
||||||
@@ -52,14 +56,16 @@ set -xU XSET_RATE 90
|
|||||||
set -xU XSET_DELAY 200
|
set -xU XSET_DELAY 200
|
||||||
# causes xmodmap to have issues when opening terminal sometimes
|
# causes xmodmap to have issues when opening terminal sometimes
|
||||||
# xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE
|
# xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE
|
||||||
|
{{ if and (eq .chezmoi.fullHostname "x1-carbon") (not (eq .chezmoi.username "root")) }}
|
||||||
xset r rate $XSET_DELAY $XSET_RATE
|
xset r rate $XSET_DELAY $XSET_RATE
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
# set -U BROWSER "chromium"
|
# set -U BROWSER "chromium"
|
||||||
set -U BROWSER "firefox"
|
set -U BROWSER "firefox"
|
||||||
|
|
||||||
# }}} universal var's #
|
# ]]] universal var's #
|
||||||
|
|
||||||
# fxn abbr's {{{ #
|
# fxn abbr's [[[ #
|
||||||
|
|
||||||
abbr ag "grep-aliases"
|
abbr ag "grep-aliases"
|
||||||
abbr bq "benq-brightness"
|
abbr bq "benq-brightness"
|
||||||
@@ -68,7 +74,7 @@ abbr cpe "copy echo"
|
|||||||
abbr cpp "copy echo (pwd)"
|
abbr cpp "copy echo (pwd)"
|
||||||
abbr cff "create-fish-function"
|
abbr cff "create-fish-function"
|
||||||
abbr ev "evince-silent"
|
abbr ev "evince-silent"
|
||||||
# git {{{ #
|
# git [[[ #
|
||||||
|
|
||||||
abbr gcamp "git-amend-push"
|
abbr gcamp "git-amend-push"
|
||||||
abbr gdf "git-diff-files"
|
abbr gdf "git-diff-files"
|
||||||
@@ -76,7 +82,7 @@ abbr gpsmt "git-push-multiple"
|
|||||||
abbr gremotes "git-mult-remotes"
|
abbr gremotes "git-mult-remotes"
|
||||||
abbr grmb "git-delete-branch"
|
abbr grmb "git-delete-branch"
|
||||||
|
|
||||||
# }}} git #
|
# ]]] git #
|
||||||
abbr hs "scan-history"
|
abbr hs "scan-history"
|
||||||
abbr hst "$EDITOR ~/.local/share/fish/fish_history"
|
abbr hst "$EDITOR ~/.local/share/fish/fish_history"
|
||||||
abbr mt "math"
|
abbr mt "math"
|
||||||
@@ -86,11 +92,11 @@ abbr rs "redshift-set"
|
|||||||
abbr ut "unix-timestamp"
|
abbr ut "unix-timestamp"
|
||||||
abbr uzr "unzip-rm"
|
abbr uzr "unzip-rm"
|
||||||
|
|
||||||
# }}} fxn abbr's #
|
# ]]] fxn abbr's #
|
||||||
|
|
||||||
abbr hm "cd $mfs_dir && hugo serve -D --disableFastRender"
|
abbr hm "cd $mfs_dir && hugo serve -D --disableFastRender"
|
||||||
|
|
||||||
# school {{{ #
|
# school [[[ #
|
||||||
|
|
||||||
# 309
|
# 309
|
||||||
# abbr r0t "./revert-e3-json restaurants"
|
# abbr r0t "./revert-e3-json restaurants"
|
||||||
@@ -108,4 +114,4 @@ abbr r6 "run-a4 h e"
|
|||||||
# abbr r6s "run-a3 s c o"
|
# abbr r6s "run-a3 s c o"
|
||||||
# abbr g6 "source $fish_fxn_dir/369/a3/gdb-a3-break.fish && gdb-a3-break c c"
|
# abbr g6 "source $fish_fxn_dir/369/a3/gdb-a3-break.fish && gdb-a3-break c c"
|
||||||
|
|
||||||
# }}} school #
|
# ]]] school #
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
" set x=y {{{ "
|
" vim: fdm=marker ft=vim.go-template
|
||||||
|
|
||||||
|
" set x=y [[[ "
|
||||||
|
|
||||||
set autoindent
|
set autoindent
|
||||||
set autoread
|
set autoread
|
||||||
@@ -34,18 +36,18 @@ filetype indent on
|
|||||||
syntax on
|
syntax on
|
||||||
au CursorHold * checktime
|
au CursorHold * checktime
|
||||||
|
|
||||||
" cursor indicator {{{ "
|
" cursor indicator [[[ "
|
||||||
|
|
||||||
" set listchars=tab:\|\
|
" set listchars=tab:\|\
|
||||||
" set list
|
" set list
|
||||||
" set cursorcolumn
|
" set cursorcolumn
|
||||||
" set cursorline
|
" set cursorline
|
||||||
|
|
||||||
" }}} cursor indicator "
|
" ]]] cursor indicator "
|
||||||
|
|
||||||
" }}} set x=y "
|
" ]]] set x=y "
|
||||||
|
|
||||||
" commands for file types {{{ "
|
" commands for file types [[[ "
|
||||||
|
|
||||||
autocmd BufNewFile,BufRead .* set syntax=sh
|
autocmd BufNewFile,BufRead .* set syntax=sh
|
||||||
autocmd FileType *css,htmldjango,html,javascript,json,markdown,tex,text,yaml set tabstop=2 shiftwidth=2
|
autocmd FileType *css,htmldjango,html,javascript,json,markdown,tex,text,yaml set tabstop=2 shiftwidth=2
|
||||||
@@ -68,18 +70,18 @@ autocmd VimEnter *.tex VimtexCompile
|
|||||||
autocmd VimLeave *.tex !tex-clean %:p
|
autocmd VimLeave *.tex !tex-clean %:p
|
||||||
autocmd BufNewFile,BufRead *.tmpl set tw=0 sw=2 ft=go-template fmr=[[[,]]]
|
autocmd BufNewFile,BufRead *.tmpl set tw=0 sw=2 ft=go-template fmr=[[[,]]]
|
||||||
|
|
||||||
" " auto-reload vimrc {{{ "
|
" " auto-reload vimrc [[[ "
|
||||||
|
|
||||||
" augroup myvimrc
|
" augroup myvimrc
|
||||||
" au!
|
" au!
|
||||||
" au BufWritePost .vimrc,_vimrc,vimrc,.gvimrc,_gvimrc,gvimrc so $MYVIMRC | if has('gui_running') | so $MYGVIMRC | endif
|
" au BufWritePost .vimrc,_vimrc,vimrc,.gvimrc,_gvimrc,gvimrc so $MYVIMRC | if has('gui_running') | so $MYGVIMRC | endif
|
||||||
" augroup END
|
" augroup END
|
||||||
|
|
||||||
" " }}} auto-reload vimrc "
|
" " ]]] auto-reload vimrc "
|
||||||
|
|
||||||
" }}} commands for file types "
|
" ]]] commands for file types "
|
||||||
|
|
||||||
" commands for specific files {{{ "
|
" commands for specific files [[[ "
|
||||||
|
|
||||||
autocmd BufNewFile,BufRead watson*.fish set tabstop=2 shiftwidth=2 expandtab
|
autocmd BufNewFile,BufRead watson*.fish set tabstop=2 shiftwidth=2 expandtab
|
||||||
autocmd BufRead commit-msg.txt set filetype=gitcommit tw=72
|
autocmd BufRead commit-msg.txt set filetype=gitcommit tw=72
|
||||||
@@ -90,9 +92,9 @@ autocmd BufNewFile,BufRead key_* map <F1> :w<CR>:silent !sync-shortcuts<CR>
|
|||||||
" map <F2> :silent !scp -P 2222 e1.html e1_style.css kevin@127.0.0.1:/home/kevin/Downloads/e1<CR>
|
" map <F2> :silent !scp -P 2222 e1.html e1_style.css kevin@127.0.0.1:/home/kevin/Downloads/e1<CR>
|
||||||
" map <F6> :make -C ~/Documents/resume cv<CR>
|
" map <F6> :make -C ~/Documents/resume cv<CR>
|
||||||
|
|
||||||
" }}} commands for specific files "
|
" ]]] commands for specific files "
|
||||||
|
|
||||||
" vim-plug {{{
|
" vim-plug [[[
|
||||||
" plug auto-install
|
" plug auto-install
|
||||||
if empty(glob('~/.vim/autoload/plug.vim'))
|
if empty(glob('~/.vim/autoload/plug.vim'))
|
||||||
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
||||||
@@ -139,6 +141,7 @@ Plug 'lervag/vimtex'
|
|||||||
" \ 'continuous' : 0,
|
" \ 'continuous' : 0,
|
||||||
" \}
|
" \}
|
||||||
|
|
||||||
|
{{ if not (eq .chezmoi.username "root") }}
|
||||||
" auto-completion for various languages
|
" auto-completion for various languages
|
||||||
Plug 'Valloric/YouCompleteMe'
|
Plug 'Valloric/YouCompleteMe'
|
||||||
let g:ycm_filetype_blacklist = {
|
let g:ycm_filetype_blacklist = {
|
||||||
@@ -151,6 +154,7 @@ let g:ycm_filetype_blacklist = {
|
|||||||
\ 'infolog': 1,
|
\ 'infolog': 1,
|
||||||
\ 'mail': 1
|
\ 'mail': 1
|
||||||
\}
|
\}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
" wrote short bits of text that expand into whatever you want
|
" wrote short bits of text that expand into whatever you want
|
||||||
" demo: https://www.youtube.com/watch?v=Zik6u0klD40
|
" demo: https://www.youtube.com/watch?v=Zik6u0klD40
|
||||||
@@ -226,9 +230,9 @@ Plug 'djoshea/vim-autoread'
|
|||||||
" Plug 'mustache/vim-mustache-handlebars'
|
" Plug 'mustache/vim-mustache-handlebars'
|
||||||
" Plug 'trapd00r/vim-syntax-vidir-ls'
|
" Plug 'trapd00r/vim-syntax-vidir-ls'
|
||||||
Plug 'calviken/vim-gdscript3'
|
Plug 'calviken/vim-gdscript3'
|
||||||
" }}} vim-plug "
|
" ]]] vim-plug "
|
||||||
|
|
||||||
" Mappings {{{ "
|
" Mappings [[[ "
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
" colorscheme gotham256
|
" colorscheme gotham256
|
||||||
@@ -238,7 +242,7 @@ nnoremap > >>
|
|||||||
nnoremap < <<
|
nnoremap < <<
|
||||||
inoremap << <Esc><<A
|
inoremap << <Esc><<A
|
||||||
|
|
||||||
" function keys {{{ "
|
" function keys [[[ "
|
||||||
map <F3> :wa<CR>
|
map <F3> :wa<CR>
|
||||||
map <F4> :xa<CR>
|
map <F4> :xa<CR>
|
||||||
map <F5> :q!<CR>
|
map <F5> :q!<CR>
|
||||||
@@ -248,14 +252,14 @@ map <F7> :AutoSaveToggle<CR>
|
|||||||
nnoremap <F9> :e<CR>
|
nnoremap <F9> :e<CR>
|
||||||
nnoremap <F10> :set paste<CR>"+p:set nopaste<CR>
|
nnoremap <F10> :set paste<CR>"+p:set nopaste<CR>
|
||||||
nnoremap <F11> :set paste<CR>"*p:set nopaste<CR>
|
nnoremap <F11> :set paste<CR>"*p:set nopaste<CR>
|
||||||
" }}} function keys "
|
" ]]] function keys "
|
||||||
|
|
||||||
map <S-Enter> O<ESC>
|
map <S-Enter> O<ESC>
|
||||||
" swap text visually
|
" swap text visually
|
||||||
vnoremap <C-P> <Esc>`.``gvP``P
|
vnoremap <C-P> <Esc>`.``gvP``P
|
||||||
ino <C-A> <C-O>yiW<End>=<C-R>=<C-R>0<CR>
|
ino <C-A> <C-O>yiW<End>=<C-R>=<C-R>0<CR>
|
||||||
|
|
||||||
" splits {{{ "
|
" splits [[[ "
|
||||||
nnoremap <C-Down> <C-W><C-J>
|
nnoremap <C-Down> <C-W><C-J>
|
||||||
nnoremap <C-Up> <C-W><C-K>
|
nnoremap <C-Up> <C-W><C-K>
|
||||||
nnoremap <C-Right> <C-W><C-L>
|
nnoremap <C-Right> <C-W><C-L>
|
||||||
@@ -263,9 +267,9 @@ nnoremap <C-Left> <C-W><C-H>
|
|||||||
" Maximize height/width.
|
" Maximize height/width.
|
||||||
nnoremap <C-g> <C-W>_
|
nnoremap <C-g> <C-W>_
|
||||||
nnoremap <C-w> <C-W>|
|
nnoremap <C-w> <C-W>|
|
||||||
" }}} splits "
|
" ]]] splits "
|
||||||
|
|
||||||
" leader mappings {{{ "
|
" leader mappings [[[ "
|
||||||
let mapleader="\<Space>"
|
let mapleader="\<Space>"
|
||||||
|
|
||||||
" find alias
|
" find alias
|
||||||
@@ -355,15 +359,15 @@ nnoremap <leader>yg ggyG
|
|||||||
" toggle fold
|
" toggle fold
|
||||||
nnoremap <leader>z za
|
nnoremap <leader>z za
|
||||||
|
|
||||||
" }}} leader mappings "
|
" ]]] leader mappings "
|
||||||
|
|
||||||
" }}} Mappings "
|
" ]]] Mappings "
|
||||||
|
|
||||||
" Local Mappings {{{ "
|
" Local Mappings [[[ "
|
||||||
|
|
||||||
let maplocalleader="\\"
|
let maplocalleader="\\"
|
||||||
|
|
||||||
" tex {{{ "
|
" tex [[[ "
|
||||||
|
|
||||||
autocmd Filetype tex inoremap <localleader>bt \bowtie
|
autocmd Filetype tex inoremap <localleader>bt \bowtie
|
||||||
autocmd Filetype tex inoremap <localleader>c \checkmark
|
autocmd Filetype tex inoremap <localleader>c \checkmark
|
||||||
@@ -399,7 +403,7 @@ autocmd Filetype tex inoremap <localleader>Z \mathbb{Z}
|
|||||||
autocmd Filetype tex inoremap <localleader>wx $w(x)$
|
autocmd Filetype tex inoremap <localleader>wx $w(x)$
|
||||||
autocmd Filetype tex inoremap <localleader>tx $t(x)$
|
autocmd Filetype tex inoremap <localleader>tx $t(x)$
|
||||||
|
|
||||||
" }}} tex "
|
" ]]] tex "
|
||||||
|
|
||||||
autocmd Filetype c inoremap <localleader>uc unsigned char
|
autocmd Filetype c inoremap <localleader>uc unsigned char
|
||||||
|
|
||||||
@@ -413,6 +417,6 @@ autocmd Filetype javascript inoremap <localleader>x process.exit()
|
|||||||
autocmd Filetype markdown nnoremap <localleader>x 0f[lrx
|
autocmd Filetype markdown nnoremap <localleader>x 0f[lrx
|
||||||
" nnoremap <localleader>x 0f[lrx
|
" nnoremap <localleader>x 0f[lrx
|
||||||
|
|
||||||
autocmd Filetype go-template inoremap <localleader>e {{ else }}
|
autocmd Filetype go-template inoremap <localleader>e {{"{{ else }}"}}
|
||||||
|
|
||||||
" }}} Local Mappings "
|
" ]]] Local Mappings "
|
||||||
@@ -12,8 +12,8 @@ r {{ .chezmoi.homedir }}/linux-config/dot_config/ranger/rc.conf
|
|||||||
sr {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/configs/ranger/shortcuts.conf
|
sr {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/configs/ranger/shortcuts.conf
|
||||||
ss {{ .chezmoi.homedir }}/.shortcuts
|
ss {{ .chezmoi.homedir }}/.shortcuts
|
||||||
u {{ .chezmoi.homedir }}/.Xresources
|
u {{ .chezmoi.homedir }}/.Xresources
|
||||||
v {{ .chezmoi.homedir }}/linux-config/dot_vimrc
|
v {{ .chezmoi.homedir }}/linux-config/dot_vimrc.tmpl
|
||||||
x ~/{{ .chezmoi.os }}-config/dot_config/private_fish/config.fish
|
x ~/{{ .chezmoi.os }}-config/dot_config/private_fish/config.fish.tmpl
|
||||||
y {{ .chezmoi.homedir }}/.zshrc
|
y {{ .chezmoi.homedir }}/.zshrc
|
||||||
z {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/aliases/zsh_aliases
|
z {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/aliases/zsh_aliases
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
# chezmoi
|
# chezmoi
|
||||||
- root
|
|
||||||
- shortcut script
|
|
||||||
- fish config template
|
|
||||||
- nvim setup
|
|
||||||
- home server
|
- home server
|
||||||
- lab
|
- lab
|
||||||
- template bash file
|
- template bash file
|
||||||
|
|||||||
Reference in New Issue
Block a user