From 085b850d99f440a99cf3e9f434fd9c7540b13ae9 Mon Sep 17 00:00:00 2001 From: Flo Date: Wed, 1 Feb 2023 13:25:23 +0100 Subject: [PATCH] zsh and nvim --- .config/nvim/.netrwhist | 12 ++ .config/nvim/basic-setting.vim | 22 ++++ .config/nvim/coc-settings.json | 74 ++++++++++++ .config/nvim/ftdetect/ftdetect.vim | 6 + .config/nvim/ftplugin/markdown.vim | 1 + .config/nvim/ftplugin/tex.vim | 1 + .config/nvim/ftplugin/vimwiki.vim | 1 + .config/nvim/init.vim | 19 ++++ .config/nvim/plugconfig/coc.vim | 113 ++++++++++++++++++ .config/nvim/plugconfig/easy-motion.vim | 5 + .config/nvim/plugconfig/emmet.vim | 1 + .config/nvim/plugconfig/fern.vim | 26 +++++ .config/nvim/plugconfig/git-gutter.vim | 5 + .config/nvim/plugconfig/goyo.vim | 1 + .config/nvim/plugconfig/indentline.vim | 35 ++++++ .config/nvim/plugconfig/netrw.vim | 82 ++++++++++++++ .config/nvim/plugconfig/plugins.vim | 38 +++++++ .config/nvim/plugconfig/table-mode.vim | 1 + .config/nvim/plugconfig/undotree.vim | 11 ++ .config/nvim/plugconfig/vifm.vim | 6 + .config/nvim/plugconfig/vim-airline.vim | 3 + .config/nvim/plugconfig/vim-closetag.vim | 31 +++++ .config/nvim/plugconfig/vim-fzf.vim | 7 ++ .config/nvim/plugconfig/vim-hexokinase.vim | 16 +++ .config/nvim/plugconfig/vimwiki.vim | 1 + .config/nvim/plugin/abbreviations.vim | 10 ++ .config/nvim/plugin/basic-autocmd.vim | 7 ++ .config/nvim/plugin/basic-setting.vim | 29 +++++ .config/nvim/plugin/gitgutter.vim | 3 + .config/nvim/plugin/guide-map.vim | 8 ++ .config/nvim/plugin/markdown-map.vim | 11 ++ .config/nvim/plugin/shell-map.vim | 6 + .config/nvim/plugin/standard-map.vim | 64 +++++++++++ .config/nvim/session/test.vim | 77 +++++++++++++ .config/nvim/session/workspace.vim | 83 ++++++++++++++ .config/nvim/shada/test.vim | Bin 0 -> 22557 bytes .config/nvim/vim-code-dark | 1 + .zshrc | 126 +++++++++++++++++++++ 38 files changed, 943 insertions(+) create mode 100644 .config/nvim/.netrwhist create mode 100644 .config/nvim/basic-setting.vim create mode 100644 .config/nvim/coc-settings.json create mode 100644 .config/nvim/ftdetect/ftdetect.vim create mode 100644 .config/nvim/ftplugin/markdown.vim create mode 100644 .config/nvim/ftplugin/tex.vim create mode 100644 .config/nvim/ftplugin/vimwiki.vim create mode 100644 .config/nvim/init.vim create mode 100644 .config/nvim/plugconfig/coc.vim create mode 100644 .config/nvim/plugconfig/easy-motion.vim create mode 100644 .config/nvim/plugconfig/emmet.vim create mode 100644 .config/nvim/plugconfig/fern.vim create mode 100644 .config/nvim/plugconfig/git-gutter.vim create mode 100644 .config/nvim/plugconfig/goyo.vim create mode 100644 .config/nvim/plugconfig/indentline.vim create mode 100644 .config/nvim/plugconfig/netrw.vim create mode 100644 .config/nvim/plugconfig/plugins.vim create mode 100644 .config/nvim/plugconfig/table-mode.vim create mode 100644 .config/nvim/plugconfig/undotree.vim create mode 100644 .config/nvim/plugconfig/vifm.vim create mode 100644 .config/nvim/plugconfig/vim-airline.vim create mode 100644 .config/nvim/plugconfig/vim-closetag.vim create mode 100644 .config/nvim/plugconfig/vim-fzf.vim create mode 100644 .config/nvim/plugconfig/vim-hexokinase.vim create mode 100644 .config/nvim/plugconfig/vimwiki.vim create mode 100644 .config/nvim/plugin/abbreviations.vim create mode 100644 .config/nvim/plugin/basic-autocmd.vim create mode 100644 .config/nvim/plugin/basic-setting.vim create mode 100644 .config/nvim/plugin/gitgutter.vim create mode 100644 .config/nvim/plugin/guide-map.vim create mode 100644 .config/nvim/plugin/markdown-map.vim create mode 100644 .config/nvim/plugin/shell-map.vim create mode 100644 .config/nvim/plugin/standard-map.vim create mode 100644 .config/nvim/session/test.vim create mode 100644 .config/nvim/session/workspace.vim create mode 100644 .config/nvim/shada/test.vim create mode 160000 .config/nvim/vim-code-dark create mode 100644 .zshrc diff --git a/.config/nvim/.netrwhist b/.config/nvim/.netrwhist new file mode 100644 index 0000000..c83080f --- /dev/null +++ b/.config/nvim/.netrwhist @@ -0,0 +1,12 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhistcnt =1 +let g:netrw_dirhist_1='/home/brodie' +let g:netrw_dirhist_0='/home/brodie/.abduco' +let g:netrw_dirhist_9='/home/brodie/scripts/alsa' +let g:netrw_dirhist_8='/home/brodie/repos/bookmenu' +let g:netrw_dirhist_7='/home/brodie' +let g:netrw_dirhist_6='/home/brodie/.config/mpd' +let g:netrw_dirhist_5='/home/brodie' +let g:netrw_dirhist_4='/home/brodie/repos/dotfiles/config/nvim' +let g:netrw_dirhist_3='/home/brodie/repos/dotfiles/config/cointop' +let g:netrw_dirhist_2='/home/brodie' diff --git a/.config/nvim/basic-setting.vim b/.config/nvim/basic-setting.vim new file mode 100644 index 0000000..ea858e6 --- /dev/null +++ b/.config/nvim/basic-setting.vim @@ -0,0 +1,22 @@ + "set termguicolors +colorscheme codedark +vmap < >gv +set showmatch " show matching +set ignorecase " case insensitive +set hlsearch " highlight search +set incsearch " incremental search +set tabstop=4 " number of columns occupied by a tab +set softtabstop=4 " see multiple spaces as tabstops so does the right thing +set expandtab " converts tabs to white space +set shiftwidth=4 " width for autoindents +" set autoindent " indent a new line the same amount as the line just typed +" set mouse=v " middle-click paste with +" set mouse=a " enable mouse click +" set clipboard=unnamedplus " using system clipboard +filetype plugin on +set cursorline " highlight current cursorline +set ttyfast " Speed up scrolling in Vim +" set spell " enable spell check (may need to download language package) +" set noswapfile " disable creating swap file +" set backupdir=~/.cache/vim " Directory to store backup files. diff --git a/.config/nvim/coc-settings.json b/.config/nvim/coc-settings.json new file mode 100644 index 0000000..ad735f0 --- /dev/null +++ b/.config/nvim/coc-settings.json @@ -0,0 +1,74 @@ +{ + "pairs.enableCharacters": ["(", "[", "{", "'", "\"", "`"], + "suggest.noselect": false, + "coc.preferences.formatOnSaveFiletypes": [ + "javascript", + "typescript", + "typescriptreact", + "json", + "javascriptreact", + "typescript.tsx", + "graphql" + ], + "explorer.icon.enableNerdfont": true, + "explorer.quitOnOpen": true, + "explorer.position": "left", + "explorer.file.showHiddenFiles": true, + "explorer.file.column.clip.copy": "", + "explorer.file.column.clip.cut": "", + "explorer.keyMappings": { + "gk": "expandablePrev", + "gj": "expandableNext", + + "": "toggleSelection", + "": "actionMenu", + + "h": "collapse", + "l": ["expandable?", "expand", "open"], + "J": ["toggleSelection", "nodeNext"], + "K": ["toggleSelection", "nodePrev"], + "<2-LeftMouse>": [ + "expandable?", + ["expanded?", "collapse", "expand"], + "open" + ], + "o": ["expanded?", "collapse", "expand"], + "": ["expandable?", "cd", "open"], + "H": "open:split", + "S": "open:split:plain", + "V": "open:vsplit", + "": "gotoParent", + + "Y": "copyFile", + "X": "cutFile", + "P": "pasteFile", + "dd": "delete", + + "mf": "addFile", + "md": "addDirectory", + "r": "rename", + + ".": "toggleHidden", + "R": "refresh", + + "?": "help", + "q": "quit", + "": "esc", + "!": "systemExecute", + "gd": "listDrive", + + "f": "search", + "F": "searchRecursive", + + "gf": "gotoSource:file", + "gb": "gotoSource:buffer", + + "[[": "sourcePrev", + "]]": "sourceNext", + + "gp": "gitPrev", + "gn": "gitNext", + "ga": "gitStage", + "gr": "gitUnstage" + } +} diff --git a/.config/nvim/ftdetect/ftdetect.vim b/.config/nvim/ftdetect/ftdetect.vim new file mode 100644 index 0000000..5539e91 --- /dev/null +++ b/.config/nvim/ftdetect/ftdetect.vim @@ -0,0 +1,6 @@ +" Fix tex file type set +autocmd BufRead,BufNewFile *.tex set filetype=tex +autocmd BufRead,BufNewFile *.md set filetype=markdown +autocmd BufRead,BufNewFile *.tp set filetype=type +autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown + diff --git a/.config/nvim/ftplugin/markdown.vim b/.config/nvim/ftplugin/markdown.vim new file mode 100644 index 0000000..404fe39 --- /dev/null +++ b/.config/nvim/ftplugin/markdown.vim @@ -0,0 +1 @@ +setlocal spell spelllang=en_au diff --git a/.config/nvim/ftplugin/tex.vim b/.config/nvim/ftplugin/tex.vim new file mode 100644 index 0000000..404fe39 --- /dev/null +++ b/.config/nvim/ftplugin/tex.vim @@ -0,0 +1 @@ +setlocal spell spelllang=en_au diff --git a/.config/nvim/ftplugin/vimwiki.vim b/.config/nvim/ftplugin/vimwiki.vim new file mode 100644 index 0000000..404fe39 --- /dev/null +++ b/.config/nvim/ftplugin/vimwiki.vim @@ -0,0 +1 @@ +setlocal spell spelllang=en_au diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim new file mode 100644 index 0000000..5175610 --- /dev/null +++ b/.config/nvim/init.vim @@ -0,0 +1,19 @@ +if !exists('g:vscode') + source ~/.config/nvim/basic-setting.vim + source ~/.config/nvim/plugconfig/indentline.vim + source ~/.config/nvim/plugconfig/vifm.vim + source ~/.config/nvim/plugconfig/vimwiki.vim + source ~/.config/nvim/plugconfig/easy-motion.vim + source ~/.config/nvim/plugconfig/undotree.vim + source ~/.config/nvim/plugconfig/emmet.vim + source ~/.config/nvim/plugconfig/table-mode.vim + source ~/.config/nvim/plugconfig/goyo.vim + source ~/.config/nvim/plugconfig/git-gutter.vim + source ~/.config/nvim/plugconfig/vim-airline.vim + source ~/.config/nvim/plugconfig/vim-hexokinase.vim + source ~/.config/nvim/plugconfig/vim-fzf.vim + source ~/.config/nvim/plugconfig/fern.vim + source ~/.config/nvim/plugconfig/vim-closetag.vim + source ~/.config/nvim/plugconfig/coc.vim + source ~/.config/nvim/plugconfig/netrw.vim +endif diff --git a/.config/nvim/plugconfig/coc.vim b/.config/nvim/plugconfig/coc.vim new file mode 100644 index 0000000..e5dbfcf --- /dev/null +++ b/.config/nvim/plugconfig/coc.vim @@ -0,0 +1,113 @@ +" prettier command for coc +command! -nargs=0 Prettier :CocCommand prettier.formatFile +let g:coc_global_extensions = [ + \ 'coc-snippets', + \ 'coc-pairs', + \ 'coc-prettier', + \ 'coc-tsserver', + \ 'coc-html', + \ 'coc-css', + \ 'coc-json', + \ 'coc-angular', + \ 'coc-explorer', + \ 'coc-vimtex', + \ 'coc-python', + \ 'coc-marketplace' + \ ] + +noremap :CocCommand explorer + +" From Coc Readme +set updatetime=300 + +" Some servers have issues with backup files, see #649 +set nobackup +set nowritebackup + +" don't give |ins-completion-menu| messages. +set shortmess+=c + +" always show signcolumns +set signcolumn=yes + +" Use tab for trigger completion with characters ahead and navigate. +" Use command ':verbose imap ' to make sure tab is not mapped by other plugin. +inoremap + \ pumvisible() ? "\" : + \ check_back_space() ? "\" : + \ coc#refresh() +inoremap pumvisible() ? "\" : "\" + +function! s:check_back_space() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' +endfunction + +" Use to trigger completion. +inoremap coc#refresh() + +" Use to confirm completion, `u` means break undo chain at current position. +" Coc only does snippet and additional edit on confirm. +inoremap pumvisible() ? "\" : "\u\" +" Or use `complete_info` if your vim support it, like: +" inoremap complete_info()["selected"] != "-1" ? "\" : "\u\" + +" Use `[g` and `]g` to navigate diagnostics +nmap [g (coc-diagnostic-prev) +nmap ]g (coc-diagnostic-next) + +" Remap keys for gotos +nmap gd (coc-definition) +nmap gy (coc-type-definition) +nmap gi (coc-implementation) +nmap gr (coc-references) + +function! s:show_documentation() + if (index(['vim','help'], &filetype) >= 0) + execute 'h '.expand('') + else + call CocAction('doHover') + endif +endfunction + +" Remap for rename current word +nmap (coc-rename) + +" Remap for format selected region +xmap f (coc-format-selected) +nmap f (coc-format-selected) + +augroup mygroup + autocmd! + " Setup formatexpr specified filetype(s). + autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') + " Update signature help on jump placeholder + autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') +augroup end + +" Remap for do codeAction of selected region, ex: `aap` for current paragraph +xmap a (coc-codeaction-selected) +nmap a (coc-codeaction-selected) + +" Remap for do codeAction of current line +nmap ac (coc-codeaction) +" Fix autofix problem of current line +nmap qf (coc-fix-current) + +" Create mappings for function text object, requires document symbols feature of languageserver. +xmap if (coc-funcobj-i) +xmap af (coc-funcobj-a) +omap if (coc-funcobj-i) +omap af (coc-funcobj-a) + +" Use `:Format` to format current buffer +command! -nargs=0 Format :call CocAction('format') + +" Use `:Fold` to fold current buffer +command! -nargs=? Fold :call CocAction('fold', ) + +" use `:OR` for organize import of current buffer +command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport') + +" Add status line support, for integration with other plugin, checkout `:h coc-status` +set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} diff --git a/.config/nvim/plugconfig/easy-motion.vim b/.config/nvim/plugconfig/easy-motion.vim new file mode 100644 index 0000000..9757d92 --- /dev/null +++ b/.config/nvim/plugconfig/easy-motion.vim @@ -0,0 +1,5 @@ +map . (easymotion-repeat) +map f (easymotion-overwin-f) +map j (easymotion-overwin-line) +map k (easymotion-overwin-line) +map w (easymotion-overwin-w) diff --git a/.config/nvim/plugconfig/emmet.vim b/.config/nvim/plugconfig/emmet.vim new file mode 100644 index 0000000..32934c3 --- /dev/null +++ b/.config/nvim/plugconfig/emmet.vim @@ -0,0 +1 @@ +let g:user_emmet_leader_key='' diff --git a/.config/nvim/plugconfig/fern.vim b/.config/nvim/plugconfig/fern.vim new file mode 100644 index 0000000..52e7ab8 --- /dev/null +++ b/.config/nvim/plugconfig/fern.vim @@ -0,0 +1,26 @@ +let g:fern#drawer_width = 30 +let g:fern#default_hidden = 1 +let g:fern#disable_drawer_auto_quit = 1 + +"noremap :Fern . -drawer -toggle + +function! s:init_fern() abort + nmap H (fern-action-open:split) + nmap V (fern-action-open:vsplit) + nmap R (fern-action-rename) + nmap M (fern-action-move) + nmap C (fern-action-copy) + nmap N (fern-action-new-path) + nmap T (fern-action-new-file) + nmap D (fern-action-new-dir) + nmap S (fern-action-hidden-toggle) + nmap dd (fern-action-trash) + nmap (fern-action-mark) +endfunction + +augroup fern-custom + autocmd! * + autocmd FileType fern call s:init_fern() +augroup END + +let g:fern#renderer = "nerdfont" diff --git a/.config/nvim/plugconfig/git-gutter.vim b/.config/nvim/plugconfig/git-gutter.vim new file mode 100644 index 0000000..332f25e --- /dev/null +++ b/.config/nvim/plugconfig/git-gutter.vim @@ -0,0 +1,5 @@ +nmap ) (GitGutterNextHunk) +nmap ( (GitGutterPrevHunk) +let g:gitgutter_enabled = 1 +let g:gitgutter_map_keys = 0 +let g:gitgutter_highlight_linenrs = 1 diff --git a/.config/nvim/plugconfig/goyo.vim b/.config/nvim/plugconfig/goyo.vim new file mode 100644 index 0000000..9cb91cf --- /dev/null +++ b/.config/nvim/plugconfig/goyo.vim @@ -0,0 +1 @@ +noremap g :Goyo diff --git a/.config/nvim/plugconfig/indentline.vim b/.config/nvim/plugconfig/indentline.vim new file mode 100644 index 0000000..d89394c --- /dev/null +++ b/.config/nvim/plugconfig/indentline.vim @@ -0,0 +1,35 @@ +"let g:indentLine_showFirstIndentLevel = 1 +"let g:indentLine_fileType = ['javascript', 'c'] +let g:indentLine_fileTypeExclude = ["vimwiki", "coc-explorer", "help", "undotree", "diff"] +let g:indentLine_bufTypeExclude = ["help", "terminal"] +"let g:indentLine_bufNameExclude = [] +let g:indentLine_indentLevel = 10 + +" Conceal settings +let g:indentLine_setConceal = 1 +let g:indentLine_concealcursor = "incv" +let g:indentLine_conceallevel = 2 + +let g:indentLine_char = '|' +"let g:indentLine_char_list = ['|', '¦', '┆', '┊'] + +" Leading Space +"let g:indentLine_leadingSpaceEnabled = 1 +let g:indentLine_leadingSpaceChar = "•" + +" Use Theme Colors +"let g:indentLine_setColors = 0 + +" 16 Color +let g:indentLine_color_tty_light = 7 " (default: 4) +let g:indentLine_color_dark = 1 " (default: 2) + +" 256 +let g:indentLine_color_term = 239 + +" True Color +let g:indentLine_color_gui = '#616161' + +" Background (256, True) +"let g:indentLine_bgcolor_term = 202 +"let g:indentLine_bgcolor_gui = '#FF5F00' diff --git a/.config/nvim/plugconfig/netrw.vim b/.config/nvim/plugconfig/netrw.vim new file mode 100644 index 0000000..a9451ff --- /dev/null +++ b/.config/nvim/plugconfig/netrw.vim @@ -0,0 +1,82 @@ +let g:netrw_banner = 0 +let g:netrw_liststyle = 3 +let g:netrw_browse_split = 4 +let g:netrw_winsize = 20 + +function! OpenToRight() + :normal v + let g:path=expand('%:p') + execute 'q!' + execute 'belowright vnew' g:path + :normal l +endfunction + +function! OpenBelow() + :normal v + let g:path=expand('%:p') + execute 'q!' + execute 'belowright new' g:path + :normal l +endfunction + +function! OpenTab() + :normal v + let g:path=expand('%:p') + execute 'q!' + execute 'tabedit' g:path + :normal l +endfunction + +function! NetrwMappings() + " Hack fix to make ctrl-l work properly + noremap l + noremap l + noremap :call ToggleNetrw() + noremap :call ToggleNetrw() + noremap V :call OpenToRight() + noremap H :call OpenBelow() + noremap T :call OpenTab() +endfunction + +augroup netrw_mappings + autocmd! + autocmd filetype netrw call NetrwMappings() +augroup END + +" Allow for netrw to be toggled +function! ToggleNetrw() + if g:NetrwIsOpen + let i = bufnr("$") + while (i >= 1) + if (getbufvar(i, "&filetype") == "netrw") + silent exe "bwipeout " . i + endif + let i-=1 + endwhile + let g:NetrwIsOpen=0 + else + let g:NetrwIsOpen=1 + silent Lexplore + endif +endfunction + +" Check before opening buffer on any file +function! NetrwOnBufferOpen() + if exists('b:noNetrw') + return + endif + call ToggleNetrw() +endfun + +" Close Netrw if it's the only buffer open +autocmd WinEnter * if winnr('$') == 1 && getbufvar(winbufnr(winnr()), "&filetype") == "netrw" || &buftype == 'quickfix' |q|endif + +" Make netrw act like a project Draw +augroup ProjectDrawer + autocmd! + " Don't open Netrw + autocmd VimEnter ~/.config/joplin/tmp/*,/tmp/calcurse*,~/.calcurse/notes/*,~/vimwiki/*,*/.git/COMMIT_EDITMSG let b:noNetrw=1 + autocmd VimEnter * :call NetrwOnBufferOpen() +augroup END + +let g:NetrwIsOpen=0 diff --git a/.config/nvim/plugconfig/plugins.vim b/.config/nvim/plugconfig/plugins.vim new file mode 100644 index 0000000..4fa9f68 --- /dev/null +++ b/.config/nvim/plugconfig/plugins.vim @@ -0,0 +1,38 @@ +call plug#begin('~/.config/nvim/plugged') + +" Themes +Plug 'vim-airline/vim-airline' +Plug 'vim-airline/vim-airline-themes' +Plug 'tomasiser/vim-code-dark' +" Code Completion +Plug 'neoclide/coc.nvim', {'branch': 'release'} +" Tags +Plug 'alvan/vim-closetag' +Plug 'tpope/vim-surround' +Plug 'mattn/emmet-vim' +" Commenting +Plug 'tpope/vim-commentary' +" Syntax highlighting +Plug 'HerringtonDarkholme/yats.vim' +Plug 'yuezk/vim-js' +Plug 'maxmellon/vim-jsx-pretty' +Plug 'rust-lang/rust.vim' +" Motions +Plug 'easymotion/vim-easymotion' +" Git +Plug 'airblade/vim-gitgutter' +Plug 'tpope/vim-fugitive' +" Misc +Plug 'junegunn/fzf.vim' +Plug 'junegunn/goyo.vim' +Plug 'rrethy/vim-hexokinase', { 'do': 'make hexokinase' } +Plug 'vimwiki/vimwiki' +Plug 'tpope/vim-repeat' +Plug 'dhruvasagar/vim-table-mode' +Plug 'itchyny/calendar.vim' +Plug 'mbbill/undotree' +"Plug 'lambdalisue/fern.vim' +Plug 'lambdalisue/nerdfont.vim' +Plug 'lambdalisue/fern-renderer-nerdfont.vim' + +call plug#end() diff --git a/.config/nvim/plugconfig/table-mode.vim b/.config/nvim/plugconfig/table-mode.vim new file mode 100644 index 0000000..dae8457 --- /dev/null +++ b/.config/nvim/plugconfig/table-mode.vim @@ -0,0 +1 @@ +let g:table_mode_delete_row_map = "tdr" diff --git a/.config/nvim/plugconfig/undotree.vim b/.config/nvim/plugconfig/undotree.vim new file mode 100644 index 0000000..4b0fa84 --- /dev/null +++ b/.config/nvim/plugconfig/undotree.vim @@ -0,0 +1,11 @@ +nnoremap :UndotreeToggle + +let g:undotree_RelativeTimestamp = 1 +let g:undotree_ShortIndicators = 1 +let g:undotree_HelpLine = 0 +let g:undotree_WindowLayout = 2 + +if has("persistent_undo") + set undodir=$HOME/.local/share/nvim/undodir + set undofile +endif diff --git a/.config/nvim/plugconfig/vifm.vim b/.config/nvim/plugconfig/vifm.vim new file mode 100644 index 0000000..7a67190 --- /dev/null +++ b/.config/nvim/plugconfig/vifm.vim @@ -0,0 +1,6 @@ +let g:vifm_replace_netrw = 1 +let g:vifm_replace_netrw_cmd = "Vifm" +"let g:vifm_embed_term = 1 +"let g:vifm_embed_split = 1 + +"let g:vifm_exec_args = diff --git a/.config/nvim/plugconfig/vim-airline.vim b/.config/nvim/plugconfig/vim-airline.vim new file mode 100644 index 0000000..a4d7e47 --- /dev/null +++ b/.config/nvim/plugconfig/vim-airline.vim @@ -0,0 +1,3 @@ +let g:airline#extensions#wordcount#enabled = 1 +let g:airline#extensions#hunks#non_zero_only = 1 +let g:airline_theme = 'codedark' diff --git a/.config/nvim/plugconfig/vim-closetag.vim b/.config/nvim/plugconfig/vim-closetag.vim new file mode 100644 index 0000000..ceef7ed --- /dev/null +++ b/.config/nvim/plugconfig/vim-closetag.vim @@ -0,0 +1,31 @@ +" filenames like *.xml, *.html, *.xhtml, ... +" These are the file extensions where this plugin is enabled. +let g:closetag_filenames = '*.html,*.xhtml,*.jsx,*.js,*.tsx' + +" filenames like *.xml, *.xhtml, ... +" This will make the list of non-closing tags self-closing in the specified files. +let g:closetag_xhtml_filenames = '*.xml,*.xhtml,*.jsx,*.js,*.tsx' + +" filetypes like xml, html, xhtml, ... +" These are the file types where this plugin is enabled. +let g:closetag_filetypes = 'html,xhtml,jsx,js,tsx' + +" filetypes like xml, xhtml, ... +" This will make the list of non-closing tags self-closing in the specified files. +let g:closetag_xhtml_filetypes = 'xml,xhtml,jsx,js,tsx' + +" integer value [0|1] +" This will make the list of non-closing tags case-sensitive (e.g. `` will be closed while `` won't.) +let g:closetag_emptyTags_caseSensitive = 1 + +" Disables auto-close if not in a "valid" region (based on filetype) +let g:closetag_regions = { + \ 'typescript.tsx': 'jsxRegion,tsxRegion', + \ 'javascript.jsx': 'jsxRegion', + \ } + +" Shortcut for closing tags, default is '>' +let g:closetag_shortcut = '>' + +" Add > at current position without closing the current tag, default is '' +let g:closetag_close_shortcut = '>' diff --git a/.config/nvim/plugconfig/vim-fzf.vim b/.config/nvim/plugconfig/vim-fzf.vim new file mode 100644 index 0000000..7404847 --- /dev/null +++ b/.config/nvim/plugconfig/vim-fzf.vim @@ -0,0 +1,7 @@ +nnoremap :GFiles +nnoremap :Files + +command! -bang -nargs=? -complete=dir Files + \ call fzf#vim#files(, {'options': ['--preview', 'preview {}']}, 0) +command! -bang -nargs=? -complete=dir GFiles + \ call fzf#vim#gitfiles(, {'options': ['--preview', 'preview {}']}, 0) diff --git a/.config/nvim/plugconfig/vim-hexokinase.vim b/.config/nvim/plugconfig/vim-hexokinase.vim new file mode 100644 index 0000000..3f007b4 --- /dev/null +++ b/.config/nvim/plugconfig/vim-hexokinase.vim @@ -0,0 +1,16 @@ +let g:Hexokinase_refreshEvents = ['InsertLeave'] + +let g:Hexokinase_optInPatterns = [ +\ 'full_hex', +\ 'triple_hex', +\ 'rgb', +\ 'rgba', +\ 'hsl', +\ 'hsla', +\ 'colour_names' +\ ] + +let g:Hexokinase_highlighters = ['backgroundfull'] + +" Reenable hexokinase on enter +autocmd VimEnter * HexokinaseTurnOn diff --git a/.config/nvim/plugconfig/vimwiki.vim b/.config/nvim/plugconfig/vimwiki.vim new file mode 100644 index 0000000..88f7c24 --- /dev/null +++ b/.config/nvim/plugconfig/vimwiki.vim @@ -0,0 +1 @@ +let g:vimwiki_list = [{'path': '~/.local/share/vimwiki/', 'auto_diary_index': 1}] diff --git a/.config/nvim/plugin/abbreviations.vim b/.config/nvim/plugin/abbreviations.vim new file mode 100644 index 0000000..5384137 --- /dev/null +++ b/.config/nvim/plugin/abbreviations.vim @@ -0,0 +1,10 @@ +cnoreabbrev W! w! +cnoreabbrev Q! q! +cnoreabbrev Qall! qall! +cnoreabbrev Wq wq +cnoreabbrev Wa wa +cnoreabbrev wQ wq +cnoreabbrev WQ wq +cnoreabbrev W w +cnoreabbrev Q q +cnoreabbrev Qall qall diff --git a/.config/nvim/plugin/basic-autocmd.vim b/.config/nvim/plugin/basic-autocmd.vim new file mode 100644 index 0000000..fd34c84 --- /dev/null +++ b/.config/nvim/plugin/basic-autocmd.vim @@ -0,0 +1,7 @@ + +" Vertically center document when entering insert mode +autocmd InsertEnter * norm zz + +" Remove trailing whitespace on save +autocmd BufWritePre * %s/\s\+$//e + diff --git a/.config/nvim/plugin/basic-setting.vim b/.config/nvim/plugin/basic-setting.vim new file mode 100644 index 0000000..b0a3057 --- /dev/null +++ b/.config/nvim/plugin/basic-setting.vim @@ -0,0 +1,29 @@ +let mapleader=" " + +" Use system clipboard +set clipboard+=unnamedplus + +set mouse=v +syntax on +set ignorecase +set smartcase +set encoding=utf-8 +set number relativenumber + +" Tab Settings +set expandtab +set shiftwidth=2 +set softtabstop=2 +set tabstop=2 + +set path=.,,** + +" Autocompletion +set wildmode=longest,list,full + +" Fix splitting +set splitbelow splitright + +" Cursor line +set cursorline +set cursorcolumn diff --git a/.config/nvim/plugin/gitgutter.vim b/.config/nvim/plugin/gitgutter.vim new file mode 100644 index 0000000..3ffff3b --- /dev/null +++ b/.config/nvim/plugin/gitgutter.vim @@ -0,0 +1,3 @@ +highlight GitGutterAdd guifg=#009900 ctermfg=Green +highlight GitGutterChange guifg=#bbbb00 ctermfg=Yellow +highlight GitGutterDelete guifg=#ff2222 ctermfg=Red diff --git a/.config/nvim/plugin/guide-map.vim b/.config/nvim/plugin/guide-map.vim new file mode 100644 index 0000000..9316676 --- /dev/null +++ b/.config/nvim/plugin/guide-map.vim @@ -0,0 +1,8 @@ +" Guide navigation +noremap /<++>"_c4l +inoremap /<++>"_c4l +vnoremap /<++>"_c4l + +" general insert commands +inoremap ;g <++> + diff --git a/.config/nvim/plugin/markdown-map.vim b/.config/nvim/plugin/markdown-map.vim new file mode 100644 index 0000000..fd87be7 --- /dev/null +++ b/.config/nvim/plugin/markdown-map.vim @@ -0,0 +1,11 @@ +autocmd FileType markdown noremap r i---title:<++>author:"Brodie Robertson"geometry:-top=30mm-left=20mm-right=20mm-bottom=30mmheader-includes:\|\usepackage{float}\let\origfigure\figure\let\endorigfigure\endfigure\renewenvironment{figure}[1][2]{\expandafter\origfigure\expandafter[H]}{\endorigfigure}--- +autocmd FileType markdown inoremap ,i ![](<++>){#fig:<++>}<++>kkF]i +autocmd FileType markdown inoremap ,a [](<++>)<++>F]i +autocmd FileType markdown inoremap ,1 #<++>2k +autocmd FileType markdown inoremap ,2 ##<++>2k +autocmd FileType markdown inoremap ,3 ###<++>2k +autocmd FileType markdown inoremap ,4 ####<++>2k +autocmd FileType markdown inoremap ,5 #####<++>2k +autocmd FileType markdown inoremap ,u +<++>1k +autocmd FileType markdown inoremap ,o 1.<++>1k +autocmd FileType markdown inoremap ,f +@fig: diff --git a/.config/nvim/plugin/shell-map.vim b/.config/nvim/plugin/shell-map.vim new file mode 100644 index 0000000..53333a0 --- /dev/null +++ b/.config/nvim/plugin/shell-map.vim @@ -0,0 +1,6 @@ +map b i#!/bin/sh +autocmd FileType sh inoremap ,f (){<++>}<++>?() +autocmd FileType sh inoremap ,i if[];then<++>fi<++>?];hi +autocmd FileType sh inoremap ,ei elif[];then<++>?];hi +autocmd FileType sh inoremap ,sw case""in<++>)<++>;;<++>esac<++>?"i +autocmd FileType sh inoremap ,ca )<++>;;<++>?)i diff --git a/.config/nvim/plugin/standard-map.vim b/.config/nvim/plugin/standard-map.vim new file mode 100644 index 0000000..d794802 --- /dev/null +++ b/.config/nvim/plugin/standard-map.vim @@ -0,0 +1,64 @@ +map +imap + +" Basic file system commands +nnoremap :!touch +nnoremap :!crf +nnoremap :!mkdir +nnoremap :!mv% + +" Tab +nnoremap gt +nnoremap gT +nnoremap :tabnew +nnoremap :tabmove + +nnoremap :tabmove - + +" center screen after search +nnoremap n nzzzv +nnoremap N Nzzzv + +" Fix Y behaviour +nmap Y y$ + +" Fix indenting visual block +vmap < >gv + +" Enable and disable auto comment +map c :setlocal formatoptions-=cro +map C :setlocal formatoptions=cro + +" Enable spell checking, s for spell check +map s :setlocal spell! spelllang=en_au + +" Enable Disable Auto Indent +map i :setlocal autoindent +map I :setlocal noautoindent + +" Shell check +map p :!clear && shellcheck % + +" Compile and open output +map G :w! \| !comp % +map o :!opout % + +" Shortcutting split navigation +map h +map j +map k +map l + +" Tab shortcuts +nnoremap :tabp +nnoremap :tabn + +" Alias replace all to +nnoremap :%s//gI + +" Alias write and quit to Q +nnoremap q :wq +nnoremap w :w + +" Save file as sudo when no sudo permissions +cmap w!! w !sudo tee > /dev/null % diff --git a/.config/nvim/session/test.vim b/.config/nvim/session/test.vim new file mode 100644 index 0000000..511a87c --- /dev/null +++ b/.config/nvim/session/test.vim @@ -0,0 +1,77 @@ +let SessionLoad = 1 +let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 +let v:this_session=expand(":p") +silent only +cd ~/ +if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' + let s:wipebuf = bufnr('%') +endif +set shortmess=aoO +badd +1 ~/.zshenv +badd +0 ~/.bash_profile +argglobal +%argdel +edit ~/.zshenv +set splitbelow splitright +wincmd _ | wincmd | +vsplit +1wincmd h +wincmd w +wincmd t +set winminheight=0 +set winheight=1 +set winminwidth=0 +set winwidth=1 +exe 'vert 1resize ' . ((&columns * 72 + 72) / 145) +exe 'vert 2resize ' . ((&columns * 72 + 72) / 145) +argglobal +setlocal fdm=manual +setlocal fde=0 +setlocal fmr={{{,}}} +setlocal fdi=# +setlocal fdl=0 +setlocal fml=1 +setlocal fdn=20 +setlocal fen +silent! normal! zE +let s:l = 1 - ((0 * winheight(0) + 17) / 34) +if s:l < 1 | let s:l = 1 | endif +exe s:l +normal! zt +1 +normal! 0 +wincmd w +argglobal +if bufexists("~/.bash_profile") | buffer ~/.bash_profile | else | edit ~/.bash_profile | endif +setlocal fdm=manual +setlocal fde=0 +setlocal fmr={{{,}}} +setlocal fdi=# +setlocal fdl=0 +setlocal fml=1 +setlocal fdn=20 +setlocal fen +silent! normal! zE +let s:l = 1 - ((0 * winheight(0) + 17) / 34) +if s:l < 1 | let s:l = 1 | endif +exe s:l +normal! zt +1 +normal! 01| +wincmd w +exe 'vert 1resize ' . ((&columns * 72 + 72) / 145) +exe 'vert 2resize ' . ((&columns * 72 + 72) / 145) +tabnext 1 +if exists('s:wipebuf') && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal' + silent exe 'bwipe ' . s:wipebuf +endif +unlet! s:wipebuf +set winheight=1 winwidth=20 winminheight=1 winminwidth=1 shortmess=filnxtToOFc +let s:sx = expand(":p:r")."x.vim" +if file_readable(s:sx) + exe "source " . fnameescape(s:sx) +endif +let &so = s:so_save | let &siso = s:siso_save +doautoall SessionLoadPost +unlet SessionLoad +" vim: set ft=vim : diff --git a/.config/nvim/session/workspace.vim b/.config/nvim/session/workspace.vim new file mode 100644 index 0000000..0848eb3 --- /dev/null +++ b/.config/nvim/session/workspace.vim @@ -0,0 +1,83 @@ +let SessionLoad = 1 +let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 +let v:this_session=expand(":p") +silent only +cd ~/ +if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' + let s:wipebuf = bufnr('%') +endif +set shortmess=aoO +argglobal +%argdel +set splitbelow splitright +wincmd _ | wincmd | +vsplit +1wincmd h +wincmd w +wincmd _ | wincmd | +split +1wincmd k +wincmd w +wincmd t +set winminheight=0 +set winheight=1 +set winminwidth=0 +set winwidth=1 +exe 'vert 1resize ' . ((&columns * 72 + 72) / 145) +exe '2resize ' . ((&lines * 16 + 17) / 35) +exe 'vert 2resize ' . ((&columns * 72 + 72) / 145) +exe '3resize ' . ((&lines * 16 + 17) / 35) +exe 'vert 3resize ' . ((&columns * 72 + 72) / 145) +argglobal +enew +setlocal fdm=manual +setlocal fde=0 +setlocal fmr={{{,}}} +setlocal fdi=# +setlocal fdl=0 +setlocal fml=1 +setlocal fdn=20 +setlocal fen +wincmd w +argglobal +enew +setlocal fdm=manual +setlocal fde=0 +setlocal fmr={{{,}}} +setlocal fdi=# +setlocal fdl=0 +setlocal fml=1 +setlocal fdn=20 +setlocal fen +wincmd w +argglobal +enew +setlocal fdm=manual +setlocal fde=0 +setlocal fmr={{{,}}} +setlocal fdi=# +setlocal fdl=0 +setlocal fml=1 +setlocal fdn=20 +setlocal fen +wincmd w +3wincmd w +exe 'vert 1resize ' . ((&columns * 72 + 72) / 145) +exe '2resize ' . ((&lines * 16 + 17) / 35) +exe 'vert 2resize ' . ((&columns * 72 + 72) / 145) +exe '3resize ' . ((&lines * 16 + 17) / 35) +exe 'vert 3resize ' . ((&columns * 72 + 72) / 145) +tabnext 1 +if exists('s:wipebuf') && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal' + silent exe 'bwipe ' . s:wipebuf +endif +unlet! s:wipebuf +set winheight=1 winwidth=20 winminheight=1 winminwidth=1 shortmess=filnxtToOFc +let s:sx = expand(":p:r")."x.vim" +if file_readable(s:sx) + exe "source " . fnameescape(s:sx) +endif +let &so = s:so_save | let &siso = s:siso_save +doautoall SessionLoadPost +unlet SessionLoad +" vim: set ft=vim : diff --git a/.config/nvim/shada/test.vim b/.config/nvim/shada/test.vim new file mode 100644 index 0000000000000000000000000000000000000000..43841d4dce9021ab2200355b4ebc0e1bfe94207a GIT binary patch literal 22557 zcmZQP7eBw~l2_}>^whl6qQsK?q9ZJMWtq9l%TkMqGxPI~aQlUM`YMze=$Yu5tjtZU zh|f-{EJ@{BT#%V^jzMJs=Ze(4KRGc+zc?eYC{@2K zGq*f5J5xU_Ggl!vwHV~3Vm*+^!W_wkdBz|^LWRshuGPnFNMdP8epYF2fj*3(S5i^3 zFwX>}JLDsox=q2lZ<49o46NIdOx@-n-N7@pK!GQZ>hI+IytK@8{i@;&aEuitFU%2I zmWoV`GoV zfJ9v@N>cMuQd1PdGShMuLNfA8(=$qnV`CTQ87wL)VPriQKR>-irDai3@?9^vsfs(j>j) z{9OIq{EQUc#O$KPT>Y%X^6Z6qW-t?s%g!?TfXtYF#8gWmF()&zSfRKyJw3I!Br`v+ z7@J|`C7F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d#p6c>Z+NLi~THHrC%7^+-)ejcck2a3iLsdr!pRRRDxcY}ri literal 0 HcmV?d00001 diff --git a/.config/nvim/vim-code-dark b/.config/nvim/vim-code-dark new file mode 160000 index 0000000..e56e528 --- /dev/null +++ b/.config/nvim/vim-code-dark @@ -0,0 +1 @@ +Subproject commit e56e5285ecaf5d0df1a383c432bccdbc0d464b2f diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..0338ff2 --- /dev/null +++ b/.zshrc @@ -0,0 +1,126 @@ +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block; everything else may go below. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + +# Use powerline +USE_POWERLINE="true" +# Source manjaro-zsh-configuration +if [[ -e /usr/share/zsh/manjaro-zsh-config ]]; then + source /usr/share/zsh/manjaro-zsh-config +fi +# Use manjaro zsh prompt +if [[ -e /usr/share/zsh/manjaro-zsh-prompt ]]; then + source /usr/share/zsh/manjaro-zsh-prompt +fi + +# vim: set ft=zsh sw=2 et : +# Via https://tanguy.ortolo.eu/blog/article25/shrc +# +# Zsh always executes zshenv. Then, depending on the case: +# - run as a login shell, it executes zprofile; +# - run as an interactive, it executes zshrc; +# - run as a login shell, it executes zlogin. +# +# At the end of a login session, it executes zlogout, but in reverse order, the +# user-specific file first, then the system-wide one, constituting a chiasmus +# with the zlogin files. + +# Thanks to https://github.com/elifarley/shellbase/blob/master/.zshrc +alias make='nocorrect make' + +setopt appendhistory +setopt autocd +setopt correct_all +setopt extendedglob +setopt hist_expire_dups_first +setopt hist_find_no_dups +setopt hist_ignore_all_dups +setopt hist_save_no_dups +setopt interactive_comments +setopt pushd_ignore_dups +setopt promptsubst + +# EMACS mode +bindkey -e +# TODO: This might be neat: http://unix.stackexchange.com/a/47425 +# TODO: Nice list of bindings: http://zshwiki.org/home/zle/bindkeys +# Make CTRL+Arrow skip words +# rxvt +bindkey "^[Od" backward-word +bindkey "^[Oc" forward-word +# xterm +bindkey "^[[1;5D" backward-word +bindkey "^[[1;5C" forward-word +# gnome-terminal +bindkey "^[OD" backward-word +bindkey "^[OC" forward-word + +# Ctrl+U to delete the current line before cursor +bindkey "^U" backward-kill-line +# Ctrl+Q to save the current command and switch to a new one +bindkey "^Q" push-line-or-edit + +# Ignore interactive commands from history +export HISTORY_IGNORE="(ls|bg|fg|pwd|exit|cd ..|cd -|pushd|popd)" + +# FIXME: check first if they are available +export LC_ALL=en_US.UTF-8 + +fpath=(/usr/share/zsh/vendor-completions/ $fpath) + +if [ -f $HOME/.nix-profile/init.zsh ]; then + source $HOME/.nix-profile/init.zsh + + zplug "plugins/ssh-agent", from:oh-my-zsh, ignore:oh-my-zsh.sh + # Load after ssh-agent + zplug "plugins/gpg-agent", from:oh-my-zsh, ignore:oh-my-zsh.sh + + zplug "oconnor663/zsh-sensible" + zplug "zsh-users/zsh-completions" + zplug "zsh-users/zsh-history-substring-search" + zplug "zsh-users/zsh-syntax-highlighting", defer:2 + + # Interactive Git + zplug 'wfxr/forgit' + + # Install plugins if there are plugins that have not been installed + if ! zplug check --verbose; then + printf "Install zsh plugins? [y/N]: " + if read -q; then + echo; zplug install + fi + fi + + # Then, source plugins and add commands to $PATH + zplug load # --verbose +fi + +test -r ~/.shell-common && source ~/.shell-common +test -r ~/.shell-env && source ~/.shell-env +test -r ~/.shell-aliases && source ~/.shell-aliases + +if [ -d $BREW_PREFIX ]; then + eval "$($BREW_PREFIX/bin/brew shellenv)" + fpath=($BREW_PREFIX/share/zsh/site-functions $fpath) +fi + +if [ -d $HOME/.nix-profile ]; then + . $HOME/.nix-profile/etc/profile.d/nix.sh + fpath=($HOME/.nix-profile/share/zsh/site-functions $fpath) +fi + +if [ -n "${commands[fzf-share]}" ]; then + source "$(fzf-share)/key-bindings.zsh" + source "$(fzf-share)/completion.zsh" +fi + +eval "$(direnv hook zsh)" +# Lean doesn't work great with Linux shell (in an actual tty), gonna check how +# this Starship behaves +eval "$(starship init zsh)" + +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh