Lots of small updates
4d58da3e0e251a42a67f2d02af13bbc8794cf0e2
1 parent
fdff143e
.profile
+4 -0
| 2 | 2 | ||
| 3 | 3 | eval $(keychain --eval --agents ssh -Q --quiet ~/.ssh/id_rsa) |
|
| 4 | 4 | export PATH=~/bin:~/.local/bin:~/.cabal/bin:~/.cargo/bin:$PATH |
|
| 5 | 5 | export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/cuda/lib64:/opt/cuda/extras/CUPTI/lib64" |
|
| 6 | 6 | export CUDA_HOME=/opt/cuda |
|
| 7 | + | export EDITOR=nvim |
|
| 8 | + | export VISUAL=nvim |
|
| 9 | + | export MOZ_USE_XINPUT2=1 # Pixel scrolling in Firefox |
|
| 10 | + | xinput --set-prop "11" "libinput Disable While Typing Enabled" 0 |
.vimrc
+15 -6
| 46 | 46 | set foldlevel=99 " Open all folds by default |
|
| 47 | 47 | set cmdheight=1 |
|
| 48 | 48 | set matchtime=2 " Shorter brace match time |
|
| 49 | 49 | set virtualedit=block |
|
| 50 | 50 | set tags+=.tags |
|
| 51 | + | set tags+=codex.tags |
|
| 51 | 52 | set undofile |
|
| 52 | 53 | set gdefault " Always use /g with %s/ |
|
| 53 | 54 | set colorcolumn=80 |
|
| 54 | 55 | set list |
|
| 55 | 56 | set listchars=tab:·\ ,eol:¬,trail:█ |
| 81 | 82 | set t_Co=256 |
|
| 82 | 83 | endif |
|
| 83 | 84 | ||
| 84 | 85 | let mapleader = "\<Space>" |
|
| 85 | 86 | ||
| 87 | + | let g:signify_vcs_list = ['git'] |
|
| 88 | + | ||
| 86 | 89 | " inccommand |
|
| 87 | 90 | if has("nvim") |
|
| 88 | 91 | set inccommand=nosplit |
|
| 89 | 92 | endif |
|
| 90 | 93 |
| 99 | 102 | " Per file-type indentation |
|
| 100 | 103 | au FileType haskell setlocal sts=4 sw=4 expandtab formatprg=stylish-haskell |
|
| 101 | 104 | au FileType javascript setlocal sts=4 sw=4 expandtab |
|
| 102 | 105 | au FileType css setlocal ts=4 sw=4 noexpandtab |
|
| 103 | 106 | au FileType go setlocal ts=4 sw=4 noexpandtab |
|
| 104 | - | au FileType c,cpp,glsl setlocal sw=4 noexpandtab |
|
| 107 | + | au FileType c,cpp,glsl setlocal ts=8 sw=8 noexpandtab |
|
| 105 | 108 | au FileType lua setlocal sw=2 expandtab |
|
| 106 | 109 | au FileType sh,zsh setlocal ts=2 sw=2 noexpandtab |
|
| 107 | 110 | au FileType vim,ruby setlocal sts=2 sw=2 expandtab |
|
| 108 | 111 | au FileType help setlocal ts=4 sw=4 noexpandtab |
|
| 109 | 112 | au FileType txt setlocal noai nocin nosi inde= wrap linebreak |
| 115 | 118 | au BufRead,BufNewFile *.md setf markdown |
|
| 116 | 119 | au BufRead,BufNewFile *.tex setf tex |
|
| 117 | 120 | au BufRead,BufNewFile *.todo setf todo |
|
| 118 | 121 | au BufRead,BufNewFile *.tikz setf tex |
|
| 119 | 122 | ||
| 120 | - | au TermOpen * set nonumber modifiable |
|
| 123 | + | let c_no_curly_error = 1 |
|
| 124 | + | ||
| 125 | + | if has("nvim") |
|
| 126 | + | au TermOpen * set nonumber modifiable |
|
| 127 | + | endif |
|
| 121 | 128 | ||
| 122 | 129 | " Remove trailing whitespace on save |
|
| 123 | 130 | autocmd BufWritePre * call s:StripTrailing() |
|
| 124 | 131 | function! s:StripTrailing() |
|
| 125 | 132 | let l = line(".") |
| 150 | 157 | au BufWritePost *.hs silent !haskell-tags % '.tags' |
|
| 151 | 158 | au BufWritePost *.hsc silent !haskell-tags % '.tags' |
|
| 152 | 159 | endif |
|
| 153 | 160 | ||
| 154 | 161 | if executable('ctags') |
|
| 155 | - | au BufWritePost *.c silent !ctags -f .tags -R . |
|
| 156 | - | au BufWritePost *.h silent !ctags -f .tags -R . |
|
| 162 | + | au BufWritePost *.c,*.cc,*.cpp silent !ctags -f .tags -R . |
|
| 163 | + | au BufWritePost *.h silent !ctags -f .tags -R . |
|
| 157 | 164 | endif |
|
| 158 | 165 | ||
| 159 | 166 | " File-type |
|
| 160 | 167 | filetype on |
|
| 161 | 168 | filetype plugin on |
| 210 | 217 | ||
| 211 | 218 | " Switch buffers easily |
|
| 212 | 219 | nnoremap <Tab> <C-^> |
|
| 213 | 220 | ||
| 214 | 221 | " Switch between .c and .h files easily |
|
| 215 | - | nnoremap <silent> <S-Tab> :e %:p:s,.h$,.X123X,:s,.c$,.h,:s,.X123X$,.c,<CR> |
|
| 222 | + | autocmd BufRead,BufNewFile *.c,*.h nnoremap <silent> <S-Tab> :e %:p:s,.h$,.X123X,:s,.c$,.h,:s,.X123X$,.c,<CR> |
|
| 223 | + | ||
| 224 | + | " Switch between .cc and .h files easily |
|
| 225 | + | autocmd BufRead,BufNewFile *.cc,*.h nnoremap <silent> <S-Tab> :e %:p:s,.h$,.X123X,:s,.cc$,.h,:s,.X123X$,.cc,<CR> |
|
| 216 | 226 | ||
| 217 | 227 | " Actually easier to type and I do it by mistake anyway |
|
| 218 | 228 | cnoreabbrev W w |
|
| 219 | 229 | cnoreabbrev Q q |
|
| 220 | 230 |
| 285 | 295 | Plug 'tikhomirov/vim-glsl' |
|
| 286 | 296 | Plug 'vim-pandoc/vim-pandoc-syntax' |
|
| 287 | 297 | Plug 'junegunn/goyo.vim' |
|
| 288 | 298 | Plug 'vim-scripts/fountain.vim' |
|
| 289 | 299 | Plug 'vimwiki/vimwiki' |
|
| 290 | - | Plug 'fatih/vim-go' |
|
| 291 | 300 | Plug 'exu/pgsql.vim' |
|
| 292 | 301 | Plug 'hail2u/vim-css3-syntax' |
|
| 293 | 302 | Plug 'lervag/vimtex' |
|
| 294 | 303 | Plug 'vim-scripts/gnupg.vim' |
|
| 295 | 304 |
.xserverrc
+1 -3
| 1 | 1 | #!/bin/sh |
|
| 2 | - | ||
| 3 | - | # This was useful at a time, but I forget why. |
|
| 4 | - | exec /usr/bin/Xorg -nolisten tcp "$@" vt$XDG_VTNR |
|
| 2 | + | exec /usr/bin/Xorg -arinterval 180 -ardelay 40 -nolisten tcp "$@" vt$XDG_VTNR |
.zshrc
+4 -0
| 29 | 29 | fi |
|
| 30 | 30 | ||
| 31 | 31 | # K8 integration. We lazy load because it's slow otherwise. |
|
| 32 | 32 | function kubectl() { |
|
| 33 | 33 | if ! type __start_kubectl >/dev/null 2>&1; then |
|
| 34 | + | unfunction "$0" |
|
| 34 | 35 | source <(kubectl completion zsh) |
|
| 35 | 36 | fi |
|
| 36 | 37 | command kubectl "$@" |
|
| 37 | 38 | } |
|
| 38 | 39 |
| 51 | 52 | # |
|
| 52 | 53 | # Aliases |
|
| 53 | 54 | # |
|
| 54 | 55 | alias g='git' |
|
| 55 | 56 | alias n='sudo netctl' |
|
| 57 | + | alias mk='make' |
|
| 56 | 58 | alias mv='/bin/mv -i' |
|
| 57 | 59 | alias ..='cd ..' |
|
| 58 | 60 | alias img='sxiv -a' |
|
| 59 | 61 | alias df='df -h' |
|
| 60 | 62 | alias sys='systemctl' |
| 66 | 68 | alias pacman='sudo pacman --color=auto' |
|
| 67 | 69 | alias netctl='sudo netctl' |
|
| 68 | 70 | alias vim=nvim |
|
| 69 | 71 | alias clip='xclip -sel clip' |
|
| 70 | 72 | ||
| 73 | + | export NNN_USE_EDITOR=1 |
|
| 74 | + | ||
| 71 | 75 | # |
|
| 72 | 76 | # History |
|
| 73 | 77 | # |
|
| 74 | 78 | HISTFILE=~/.zsh_history |
|
| 75 | 79 | HISTSIZE=65536 |