💾 Archived View for tilde.team › ~woland › vimrc.gmi captured on 2023-09-08 at 17:17:24. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-01-29)
-=-=-=-=-=-=-
"fix bullshit coc.nvim problem
inoremap <silent><expr> <TAB>
\ coc#pum#visible() ? coc#pum#next(1) :
\ CheckBackspace() ? "\<Tab>" :
\ coc#refresh()
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
"vim wiki
" let g:vimwiki_list = [{'path': '~/vimwiki/',
" \ 'syntax': 'markdown', 'ext': '.md'}]
" autocmd BufRead,BufNewFile *.wiki :Goyo
" autocmd VimEnter * Goyo
" Swap Caps_Lock & Escape | Requires xmodmap | Check keycode With xev
" au VimEnter * !xmodmap -e 'clear Lock' -e 'keycode 66 = Escape'
" au VimLeave * !xmodmap -e 'clear Lock' -e 'keycode 9 = Caps_Lock'
" au VimEnter * !xset r rate 250 40
"""""""""""""""""
"Encoding & Font"
"""""""""""""""""
set encoding=utf-8
" autocmd InsertLeave * write
"-----------------
call plug#begin()
Plug 'https://github.com/vim-scripts/TextFormat.git'
" Plug 'kyuhi/vim-emoji-complete'
" Plug 'junegunn/vim-emoji'
" Plug 'https://gitlab.com/gi1242/vim-emoji-ab.git'
Plug 'https://github.com/viaa/VimPlugins.git'
Plug 'terroo/vim-simple-emoji'
Plug 'itchyny/lightline.vim'
Plug 'SidOfc/mkdx'
Plug 'preservim/vim-markdown'
Plug 'base16-project/base16-vim'
Plug 'dhruvasagar/vim-table-mode'
Plug 'makerj/vim-pdf'
Plug 'junegunn/goyo.vim'
Plug 'https://github.com/tjammer/blayu.vim.git'
Plug 'https://github.com/tpope/vim-commentary.git'
Plug 'https://github.com/rhysd/clever-f.vim.git'
Plug 'https://github.com/easymotion/vim-easymotion.git'
Plug 'https://github.com/tommcdo/vim-exchange.git'
Plug 'https://github.com/terryma/vim-expand-region.git'
Plug 'https://github.com/mtth/locate.vim.git'
Plug 'mtth/scratch.vim'
Plug 'https://github.com/kshenoy/vim-signature.git'
Plug 'https://github.com/jez/vim-superman.git'
Plug 'https://github.com/chrisbra/unicode.vim.git'
Plug 'https://github.com/tpope/vim-eunuch.git'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
Plug 'https://github.com/sotte/presenting.vim.git'
Plug 'hawier-dev/hollow.vim'
Plug 'mangeshrex/everblush.vim'
Plug 'https://github.com/morhetz/gruvbox.git'
Plug 'arcticicestudio/nord-vim'
Plug 'crusoexia/vim-monokai'
Plug 'turbio/bracey.vim'
" Plug 'https://github.com/ackyshake/VimCompletesMe.git'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'maksimr/vim-jsbeautify'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'https://github.com/PhilRunninger/nerdtree-visual-selection.git'
Plug 'https://github.com/ap/vim-css-color.git'
Plug 'preservim/nerdcommenter'
Plug 'iamcco/markdown-preview.vim'
Plug 'christoomey/vim-system-copy'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'https://github.com/tpope/vim-surround.git'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'https://github.com/vim-syntastic/syntastic.git'
Plug 'https://github.com/godlygeek/tabular.git'
Plug 'https://github.com/yegappan/mru.git', {'on': 'MRU'}
Plug 'mhinz/vim-startify'
Plug 'voldikss/vim-floaterm'
Plug 'https://github.com/Yggdroot/indentLine.git'
Plug 'liuchengxu/vim-which-key'
Plug 'https://github.com/markonm/traces.vim.git'
Plug 'vimwiki/vimwiki'
Plug 'https://github.com/rstacruz/sparkup.git'
Plug 'https://github.com/vim-scripts/loremipsum.git'
Plug 'https://github.com/907th/vim-auto-save.git'
Plug 'https://github.com/Valloric/MatchTagAlways.git'
call plug#end()
""""""""
"Cursor"
""""""""
" if &term!='xterm'
" let &t_SI = "\<Esc>]50;CursorShape=1\x7"
" let &t_EI = "\<Esc>]50;CursorShape=0\x7"
" endif
" set mouse=a
" set guicursor+=a:blinkon0
"""""""""""
"Clipboard"
"""""""""""
set clipboard=unnamedplus
""""""""""""""
"Usual Things"
""""""""""""""
nnoremap ; :
"For folds to be saved on exit
"augroup remember_folds
"autocmd!
"autocmd BufWinLeave * mkview
" autocmd BufWinEnter * silent! loadview
"augroup END
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
"undo history
if has('persistent_undo')
" Save all undo files in a single location (less messy, more risky)...
set undodir=$HOME/.vimhis
" Save a lot of back-history...
set undolevels=5000
" Actually switch on persistent undo
set undofile
endif
set autochdir
set hidden
set ma
set listchars=tab:>~,nbsp:_,trail:.
set list
set conceallevel=0
set so=6
set nocompatible
set modifiable
set autoread
set cmdheight=1
set foldenable
set foldmethod=manual
set path+=**
set noswapfile
set autoindent
set ic
set incsearch
set smartcase
set lazyredraw
"set noshowmatch
set noerrorbells
set novisualbell
set t_vb=
set noeb vb t_vb=
syntax on
set number
set expandtab
set shiftwidth=4
set tabstop=4
"for backspace not working in Gvim or in Windows
"set backspace=2
filetype plugin indent on
"set cursorline
"set cursorcolumn
set hlsearch
noremap <silent><esc> <esc>:noh<CR><esc>
set termbidi
set autowrite
set autowriteall
"""""""
"Theme"
"""""""
" Inspect $TERM instad of t_Co
if &term =~ '256color'
" Enable true (24-bit) colors instead of (8-bit) 256 colors.
if has('termguicolors')
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
endif
colorscheme base16-horizon-dark
endif
" nord
" enfocado
" PaperColor
" gruvbox
" everforest
" dracula
" monokai
" Below statement is for everforest colors
" uncomment the ones with ""
" everforest theme takes a second to generate the settings the first time
" Important!!
"" if has('termguicolors')
"" set termguicolors
"" endif
" Set contrast.
" This configuration option should be placed before `colorscheme everforest`.
" Available values: 'hard', 'medium'(default), 'soft'
"" let g:everforest_background = 'hard'
"" For better performance
"" let g:everforest_better_performance = 1
"" let g:everforest_enable_italic = 1
"-------------------
"for enfocado theme
"let g:enfocado_style = 'nature' " Available: `nature` or `neon`.
"-------------------
set background=dark
"Indentline follow theme change to 1 if colors are fucked
let g:indentLine_setColors = 1
"set background=light
"""""""""""""""""""""""""""""""""""""
"Woland Netrw (FileManager) Settings"
"""""""""""""""""""""""""""""""""""""
"Uncomment all to use netrw instead of nerdtree
"naturally you must delete the lines about nerdtree
"line to uncomment are marked with 2 "
""autocmd filetype netrw call Netrw_mappings()
""function! Netrw_mappings()
""noremap <buffer>% :call CreateInPreview()<cr>
""endfunction
function! CreateInPreview()
let l:filename = input("please enter filename: ")
execute 'pedit ' . b:netrw_curdir.'/'.l:filename
endfunction
""function! CreateInPreview()
"" let l:filename = input("please enter filename: ")
"" execute 'silent !touch ' . b:netrw_curdir.'/'.l:filename
"" redraw!
""endf
let g:NetrwIsOpen=0
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 Vexplore
endif
endfunction
""augroup projectdrawer
""autocmd!
""autocmd vimenter * :Vexplore | wincmd p
""augroup end
"close if only remaining buffer
""autocmd WinEnter * if winnr('