summaryrefslogtreecommitdiff
path: root/home/xyz/.config
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2024-05-04 20:39:55 -0700
committerXiao Pan <gky44px1999@gmail.com>2024-05-04 20:39:55 -0700
commit5e2d03d00b41aab7b1159400934001a6c2ba4296 (patch)
tree1964e164d69cccb69ecd893a963eb359ad244fef /home/xyz/.config
parent8e2041d8b3647d121d439154b8d14e3ad86a306e (diff)
nvim config more universal, so all my computers can have the same config
Diffstat (limited to 'home/xyz/.config')
-rw-r--r--home/xyz/.config/nvim/init.vim19
1 files changed, 17 insertions, 2 deletions
diff --git a/home/xyz/.config/nvim/init.vim b/home/xyz/.config/nvim/init.vim
index 8928d4da..4fbfebae 100644
--- a/home/xyz/.config/nvim/init.vim
+++ b/home/xyz/.config/nvim/init.vim
@@ -8,7 +8,9 @@ call plug#begin()
"Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
"Plug 'junegunn/fzf.vim'
"Plug 'vim-perl/vim-perl', { 'for': 'perl', 'do': 'make clean carp dancer highlight-all-pragmas moose test-more try-tiny' }
-"Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } }
+if has('nvim') && executable('firefox')
+ Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } }
+endif
" tinted-theming/base16-vim has low contrast on fold title make it unreadable, but I customized it easily
" chriskempson/base16-vim doesn't do bold/italic for markdown syntax, and not maintained
" RRethy/base16-nvim does not highlight markdown codeblocks
@@ -21,9 +23,16 @@ Plug 'tinted-theming/base16-vim'
" use latest vim-markdown
Plug 'tpope/vim-markdown'
" alternatives: h-hg/fcitx.nvim, rlue/vim-barbaric, lilydjwg/fcitx.vim
-"Plug 'rlue/vim-barbaric'
+if executable('fcitx5')
+ Plug 'rlue/vim-barbaric'
+endif
" alternatives: 'thinca/vim-ref' with 'eiiches/vim-ref-info', 'HiPhish/info.vim', 'alx741/vinfo'
Plug 'https://gitlab.com/HiPhish/info.vim.git'
+" :h hexmode
+" other related doc: :h hex-editing, :h 23.3, :h edit-binary
+if executable('xxd')
+ Plug 'fidian/hexmode'
+endif
call plug#end()
" next line must put below `Plug 'glacambre/firenvim'`, else if click github issue textarea, then click elsewhere, then click textarea, textarea will not be selected (no cursor in it), not sure why
@@ -96,6 +105,12 @@ augroup END
let g:markdown_minlines = 350
"let g:markdown_fenced_languages = ['python', 'sh', 'vim', 'c', 'cpp']
+" :h hexmode, fidian/hexmode plugin
+" imagemagick .gray file format
+let g:hexmode_patterns = '*.gray'
+map <leader>h :Hexmode<CR>
+"let g:hexmode_xxd_options = '-c 32'
+
" netrw-p preview vertial split
let g:netrw_preview = 1
let g:netrw_winsize = 20