summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2023-07-21 16:17:47 +0800
committerFrederick Yin <fkfd@fkfd.me>2023-07-21 16:17:47 +0800
commit7cb6859fabde5d7a737fb3244b79acf8533e9b43 (patch)
treed1c6cb36e7b2532150cb550bb194ff0c1863876f
parentf9b25acb6c792741978964459b216092725a651e (diff)
2023-07-21 snapshot
-rw-r--r--.vimrc44
-rw-r--r--.zshrc21
-rw-r--r--kitty/kitty.conf2
3 files changed, 45 insertions, 22 deletions
diff --git a/.vimrc b/.vimrc
index e09116e..248be87 100644
--- a/.vimrc
+++ b/.vimrc
@@ -1,5 +1,5 @@
-set nocompatible " be iMproved, required
-filetype on " required
+set nocompatible " be iMproved, required
+filetype on " required
set timeoutlen=1000
set ttimeoutlen=5
@@ -13,7 +13,7 @@ Plugin 'VundleVim/Vundle.vim'
" Keep Plugin commands between vundle#begin/end.
" Coding
Plugin 'dense-analysis/ale'
-Plugin 'jiangmiao/auto-pairs'
+" Plugin 'jiangmiao/auto-pairs'
Plugin 'Shougo/deoplete.nvim'
Plugin 'preservim/nerdcommenter'
Plugin 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
@@ -21,6 +21,7 @@ Plugin 'nvim-lua/plenary.nvim'
Plugin 'nvim-telescope/telescope.nvim'
Plugin 'tpope/vim-surround'
" File types
+Plugin 'neovimhaskell/haskell-vim'
Plugin 'peterhoeg/vim-qml'
Plugin 'lervag/vimtex'
" Utilities
@@ -33,10 +34,12 @@ Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
" Music
Plugin 'azadkuh/vim-cmus'
+" Fun
+Plugin 'Eandrju/cellular-automaton.nvim'
" All of your Plugins must be added before the following line
-call vundle#end() " required
-filetype plugin indent on " required
+call vundle#end() " required
+filetype plugin indent on " required
" Brief help
" :PluginList - lists configured plugins
@@ -50,6 +53,7 @@ filetype plugin indent on " required
syntax on
set encoding=utf-8 fileformat=unix
set number
+set mouse=nvi
set splitright splitbelow
@@ -57,10 +61,16 @@ set foldmethod=indent foldlevel=99
autocmd BufRead,BufNewFile *.qml setfiletype qml
-set tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab
-autocmd FileType json,toml,yaml,html set ts=2 sw=2 sts=2 noexpandtab
-autocmd FileType python set ts=4 sw=4 sts=4 expandtab
-autocmd FileType c,cpp,asm set ts=8 sw=8 sts=8 noexpandtab
+set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab
+autocmd FileType json,toml,yaml set ts=2 sw=2 sts=2 expandtab
+autocmd FileType html,htmldjango set ts=2 sw=2 sts=2 expandtab
+autocmd FileType css set ts=2 sw=2 sts=2 expandtab
+autocmd FileType ocaml set ts=2 sw=2 sts=2 expandtab
+autocmd FileType python set ts=4 sw=4 sts=4 expandtab
+autocmd FileType markdown set ts=4 sw=4 sts=4 expandtab
+autocmd FileType tex set ts=4 sw=4 sts=4 expandtab
+autocmd FileType haskell set ts=4 sw=4 sts=4 expandtab
+autocmd FileType c,cpp,asm set ts=8 sw=8 sts=8 noexpandtab
set autoindent smartindent
set background=dark
@@ -75,9 +85,14 @@ highlight PmenuSel guibg=#61AFEF
inoremap <C-s> <esc>:w<CR>i<right>
nnoremap <leader>\ :noh<CR>
autocmd FileType python nnoremap <leader>b :!black %<CR>:e<CR>
+autocmd FileType c,cpp nnoremap <leader>b :pyf /usr/share/clang/clang-format.py<CR>
" ale
nnoremap <leader>a :ALEToggle<CR>
+nnoremap <F12> :ALEGoToDefinition<CR>
+let g:ale_lint_on_text_changed = 'normal'
+let g:ale_lint_on_insert_leave = 1
+let g:ale_virtualtext_cursor = 'disabled'
" telescope
nnoremap <leader>f :Telescope find_files<CR>
@@ -102,9 +117,12 @@ let g:NERDToggleCheckAllLines = 1
let g:vimtex_view_general_viewer = 'okular'
let g:vimtex_view_general_options = '--unique file:@pdf\#src:@line@tex'
let g:vimtex_compiler_method = 'latexmk'
+let g:vimtex_compiler_latexmk = {
+ \'options': ['-shell-escape']
+\}
" nvim-tree
-nnoremap <C-e> :NvimTreeToggle<CR>
+nnoremap <leader>e :NvimTreeToggle<CR>
nnoremap <leader>t :NvimTreeFocus<CR>
nnoremap <leader>r :NvimTreeRefresh<CR>
" a list of groups can be found at `:help nvim_tree_highlight`
@@ -115,9 +133,9 @@ nnoremap <leader>p :PencilToggle<CR>
let g:pencil#map#suspend_af = 'K'
let g:pencil#textwidth = 74
augroup pencil
- autocmd!
- autocmd FileType markdown,mkd call pencil#init()
- autocmd FileType text call pencil#init()
+ autocmd!
+ " autocmd FileType markdown,mkd call pencil#init()
+ autocmd FileType text call pencil#init()
augroup END
" vim-workspace
diff --git a/.zshrc b/.zshrc
index f0ed56b..b353b40 100644
--- a/.zshrc
+++ b/.zshrc
@@ -1,13 +1,13 @@
-export ZSH="/home/fkfd/.oh-my-zsh"
+export ZSH="/usr/share/oh-my-zsh"
ZSH_THEME="fkfd"
plugins=(
git
python
- pj
- urltools
- mosh
+ pj
+ urltools
+ mosh
)
source $ZSH/oh-my-zsh.sh
@@ -26,12 +26,12 @@ mc () {
share () {
src=$1
if [[ $2 == '' ]]; then
- dst=$1
+ dst=$(basename $1)
else
dst=$2
fi
scp -r $src www@fkfd.me:www/static/$dst
- echo "https://fkfd.me/static/$(urlencode $(basename $dst))"
+ echo "https://fkfd.me/static/$(urlencode $dst)"
}
bright () {
@@ -78,7 +78,7 @@ alias ytdlp="yt-dlp --proxy socks5://localhost:1080/"
alias v="nvim"
alias c="cat"
alias ls="exa"
-alias dormshare="sudo python -m http.server -b 192.168.8.88 80"
+alias dormshare="sudo python -m http.server -b 192.168.8.2 80"
alias scanto="scanimage -d 'hpaio:/usb/HP_LaserJet_Professional_M1219nf_MFP?serial=000000000QJA9XJFPR1a' --source Flatbed --format=jpeg --mode=Gray --resolution=200 -x 210 -y 297 -o "
alias tlmgr="/usr/share/texmf-dist/scripts/texlive/tlmgr.pl --usermode"
@@ -92,10 +92,13 @@ alias rickroll="vlc -f '/data/Videos/Rick Astley - Never Gonna Give You Up (Offi
set -B 0
# something fucked up
-alias je="journalctl -e"
+alias je="journalctl -e -f"
alias what-the-fuck-just-happened="journalctl -e -b -1"
alias accel="killall kglobalaccel5 && kglobalaccel5&"
+# TA work
+alias gccc="gcc -pedantic -std=c11 -Wall -Wextra -Werror -Wno-unused-result -Wconversion -Wvla"
+
# auto-generated by kdesrc-build initial setup: do not remove!
# Add the kdesrc-build directory to the path
# export PATH="$HOME/kde/src/kdesrc-build:$PATH"
@@ -143,3 +146,5 @@ function _comp-kdesrc-run
################################################################################
+# opam configuration
+[[ ! -r /home/fkfd/.opam/opam-init/init.zsh ]] || source /home/fkfd/.opam/opam-init/init.zsh > /dev/null 2> /dev/null
diff --git a/kitty/kitty.conf b/kitty/kitty.conf
index 9486798..9ae80e2 100644
--- a/kitty/kitty.conf
+++ b/kitty/kitty.conf
@@ -11,7 +11,7 @@ touch_scroll_multiplier 3.0
enable_audio_bell no
-open_url_with qutebrowser
+open_url_with firefox
mouse_map ctrl+left click grabbed,ungrabbed mouse_click_url_or_select
map ctrl+shift+enter new_os_window_with_cwd