this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Simplify some vscode-neovim settings

Also speed up iterm2 prompt with hostname

+25 -48
+3
.config/fish/conf.d/15-iterm2_hostname.fish
··· 1 + # Set the iterm2_hostname ahead of time to make startup faster. 2 + # See ./20-iterm2_shell_integration.fish 3 + set -g iterm2_hostname $hostname
+22 -48
.vimrc
··· 15 15 set matchpairs+=<:> 16 16 set wrapmargin=0 17 17 18 - set iskeyword-=_ 19 - 20 18 set autoindent 21 19 filetype plugin indent on 22 20 ··· 47 45 noremap gU <Nop> 48 46 noremap gUU <Nop> 49 47 50 - " System copy-paste 48 + " System copy-paste on linux 51 49 map <C-C> "+ygv 52 50 53 51 " Use newer info than the macOS builtin ··· 95 93 " Disable airline by pretending it's already loaded 96 94 let g:loaded_airline = 1 97 95 98 - " TODO Make word wrap behave better with vscode 99 - " Try opening a JSON file with long lines for example 100 - set wrap 101 96 set linebreak 102 97 set textwidth=0 103 98 ··· 124 119 xmap <expr> i visualmode() ==# 'v' ? 'i' : 'mi' 125 120 xmap <expr> I visualmode() ==# 'v' ? 'I' : 'mI' 126 121 127 - " Call VSCode commands using a visual selection from nvim 128 - function! s:vscodeNotifyVisualSelection(cmd) abort 129 - normal! gv 130 - 131 - let vmode = visualmode() 132 - if vmode ==# "V" 133 - let startLine = line("v") 134 - let endLine = line(".") 135 - call VSCodeNotifyRange(a:cmd, startLine, endLine, 1) 136 - else 137 - let [startLine, startColumn] = getpos("v")[1:2] 138 - let [endLine, endColumn] = getpos(".")[1:2] 139 - call VSCodeNotifyRangePos(a:cmd, startLine, endLine, startColumn, endColumn, 1) 140 - endif 141 - endfunction 142 - 143 - xnoremap <silent> <Leader>f :<C-u>call <SID>vscodeNotifyVisualSelection("actions.find")<CR> 144 - xnoremap <silent> <Leader>r :<C-u>call <SID>vscodeNotifyVisualSelection("editor.action.startFindReplaceAction")<CR> 145 - 146 - " TODO: Make neovim use vscode builtin search 147 - " This is commented out because it doesn't really work well with cursor 148 - " movement, and using nvim's builtin search with / is better. It would be 149 - " nice to have though. 150 - " " probably can write a function that sets a variable forward or reverse search 151 - " " For now n and N will always go in the same direction 152 - " noremap <silent> ? :<C-u>call VSCodeNotify('actions.find')<CR> 153 - " noremap <silent> / :<C-u>call VSCodeNotify('actions.find')<CR> 122 + xnoremap <Leader>f <Cmd>call VSCodeNotifyVisual("actions.find", 1)<CR> 123 + xnoremap <Leader>r <Cmd>call VSCodeNotifyVisual("editor.action.startFindReplaceAction", 1)<CR> 154 124 155 - " " Sending `i<Esc>l` is a hack to force neovim to use the VSCode 156 - " " cursor location after perfoming the next/prev command, since a mode change 157 - " " results in a cursor update 158 - " noremap <silent> N :<C-u> 159 - " \call VSCodeCall('editor.action.previousMatchFindAction')<CR> 160 - " \call VSCodeCall('cursorMove', {'to': 'right', 'by': 'character'})<CR> 161 - " noremap <silent> n :<C-u> 162 - " \call VSCodeCall('editor.action.nextMatchFindAction')<CR> 163 - " \call VSCodeCall('cursorMove', {'to': 'right', 'by': 'character'})<CR> 125 + " blocking, so we can run it as part of a `runCommands` series in vscode 126 + noremap <Leader>m <Cmd>call VSCodeCall("workbench.action.addComment")<CR> 164 127 165 128 else 166 129 " Ordinary vim/neovim settings that don't apply in VSCode ··· 230 193 231 194 " Firenvim settings 232 195 if exists('g:started_by_firenvim') 196 + " For whatever reason this doesn't needs explicit keybinding: 197 + " https://github.com/glacambre/firenvim/issues/332 198 + inoremap <D-v> <Esc>"+pa 199 + 233 200 let fc = g:firenvim_config['localSettings'] 234 201 let fc['.*'] = { 235 202 \ 'selector': 'textarea:not([readonly], [aria-readonly="true"])', 236 203 \ 'cmdline': 'neovim', 237 204 \ } 238 205 239 - " On GitHub, there aren't really any text boxes worth taking over tbh 240 - let fc['https?://github[.]com'] = { 'takeover': 'never', 'priority': 1, } 241 - " Disable for google search editor 242 - let fc['https?://(www[.])?google[.]com'] = { 'takeover': 'never', 'priority': 1 } 243 - " Disable entirely for Jira/Confluence 244 - let fc['https?://[^.]+[.]atlassian[.]net'] = { 'takeover': 'never', 'priority': 1 } 206 + let disabled_urls = [ 207 + \ 'https?://github[.]com', 208 + \ 'https?://demangler[.]com', 209 + \ 'https?://(www[.])?google[.]com', 210 + \ 'https?://[^.]+[.]atlassian[.]net', 211 + \ 'https?://play[.]rust-lang[.]org', 212 + \ 'https?://app[.]circleci[.]com', 213 + \ ] 214 + for disabled_url in disabled_urls 215 + let fc[disabled_url] = { 'takeover': 'never', 'priority': 1 } 216 + endfor 245 217 246 218 set mouse= 247 219 248 220 autocmd BufEnter github.com_*.txt set filetype=markdown 249 221 autocmd BufEnter www.shadertoy.com_*.txt set filetype=glsl 222 + autocmd BufEnter pkg.go.dev_*.txt set filetype=go 223 + autocmd BufEnter go.dev_*.txt set filetype=go 250 224 251 225 " TODO: maybe set this after a delay for UIEnter, like in 252 226 " https://github.com/glacambre/firenvim/issues/972#issuecomment-1048209573