update from tmp base16 fix

This commit is contained in:
ackman678
2021-05-10 11:18:19 -07:00
parent 4724c91d75
commit 6456731013
4 changed files with 61 additions and 26 deletions

41
.vimrc
View File

@@ -34,19 +34,11 @@ if empty(glob('~/.vim/autoload/plug.vim'))
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
"tmp fix for chriskempson/base16-vim issue197
" https://github.com/chriskempson/base16-vim/issues/197
"can switch to danielwe/base16-vim below...
function FixupBase16(info)
!sed -i '/Base16hi/\! s/a:\(attr\|guisp\)/l:\1/g' ~/.vim/plugged/base16-vim/colors/*.vim
endfunction
call plug#begin('~/.vim/plugged')
Plug '/usr/bin/fzf'
Plug 'junegunn/fzf.vim'
Plug 'tpope/vim-sensible'
Plug 'chriskempson/base16-vim', { 'do': function('FixupBase16') }
Plug 'chriskempson/base16-vim'
" Writing mode toggle `:Goyo` and `:Limelight`
Plug 'junegunn/goyo.vim'
@@ -122,6 +114,7 @@ Plug 'freitass/todo.txt-vim'
" Plug 'python-mode/python-mode', { 'for': 'python', 'branch': 'develop' }
" jupyter independent ipython repl and other languages too
" Plug 'Vigemus/iron.nvim'
Plug 'jupyter-vim/jupyter-vim'
"latex
" Plug 'lervag/vimtex'
@@ -187,7 +180,7 @@ let g:tagbar_type_bib = {
"Python repl config
" let g:loaded_python_provider = 0
" let g:python3_host_prog = '/usr/bin/python3'
let g:python3_host_prog = '/usr/bin/python3'
" let g:slime_target = 'tmux'
" let g:slime_python_ipython = 1
"
@@ -195,6 +188,14 @@ let g:tagbar_type_bib = {
":SlimeConfig
" https://github.com/jpalardy/vim-slime
" jupyter-vim config
let g:jupyter_cell_separators = ['##', '#%%', '# %%', '# <codecell>', '```']
nnoremap <buffer> <silent> <localleader>r :JupyterSendCell<CR>
" execute lines in visual mode: <localleader>e
" buffer local var for kernel can be python, ir, javascript, julia, rust
" b:jupyter_kernel_type =
"JupyterSendRange
":vertical terminal ipython
"set updatetime=100
@@ -285,6 +286,11 @@ nmap <Space> i
vmap <C-c> "+y
"use system clipboard: Now yank y, delete d, or paste p work to/from system
set clipboard=unnamedplus
" link yanking and pasting to system clipboard under Wayland
" from https://github.com/vim/vim/issues/5157
xnoremap "+y y:call system("wl-copy", @")<cr>
nnoremap "+p :let @"=substitute(system("wl-paste --no-newline"), '<C-v><C-m>', '', 'g')<cr>p
nnoremap "*p :let @"=substitute(system("wl-paste --no-newline --primary"), '<C-v><C-m>', '', 'g')<cr>p
"Auto fix common spelling errors
:ab teh the
@@ -301,6 +307,17 @@ augroup END
set title
" Triger `autoread` when files changes on disk
" https://unix.stackexchange.com/questions/149209/refresh-changed-content-of-file-opened-in-vim/383044#383044
" https://vi.stackexchange.com/questions/13692/prevent-focusgained-autocmd-running-in-command-line-editing-mode
autocmd FocusGained,BufEnter,CursorHold,CursorHoldI *
\ if mode() !~ '\v(c|r.?|!|t)' && getcmdwintype() == '' | checktime | endif
" Notification after file change
" https://vi.stackexchange.com/questions/13091/autocmd-event-for-autoread
autocmd FileChangedShellPost *
\ echohl WarningMsg | echo "File changed on disk. Buffer reloaded." | echohl None
"
"latex settings
" let g:tex_flavor="latex"
" let g:Tex_DefaultTargetFormat =" pdf"
@@ -361,12 +378,12 @@ if has("gui_running")
" Switch on highlighting the last used search pattern.
set hlsearch
" Set font
set gfn=Inconsolata\ 15
set gfn=Inconsolata\ 19
" Can toggle gui toolbar with `T` and menu with `m` in guioptions:
" default is go=aegimrLtT
set go=aegLt
":set go+=m or go-=m to toggle menu
colorscheme base16-ocean
colorscheme base16-atelier-dune
autocmd VimEnter * Goyo
autocmd VimEnter * Limelight0.8
"Switch cursor blink rate to 0msec