command! PU PlugUpdate | PlugUpgrade lua require 'colorizer'.setup({ '*'; markdown = { names = false; }; }) let g:strip_whitespace_on_save=1 autocmd FileType taskedit,crontab,markdown DisableStripWhitespaceOnSave let g:show_spaces_that_precede_tabs=1 let g:better_whitespace_skip_empty_lines=1 let g:better_whitespace_guicolor=$THEME == 'light' ? 'LightGrey' : 'DarkGrey' " see https://github.com/ntpeters/vim-better-whitespace/issues/134 - autocmd OptionSet background let g:better_whitespace_guicolor=&background == 'light' ? 'LightYellow' : 'Brown' " remap movement commands to respect CamelCase map w CamelCaseMotion_w map b CamelCaseMotion_b map e CamelCaseMotion_e map ge CamelCaseMotion_ge omap iw CamelCaseMotion_iw xmap iw CamelCaseMotion_iw omap ib CamelCaseMotion_ib xmap ib CamelCaseMotion_ib omap ie CamelCaseMotion_ie xmap ie CamelCaseMotion_ie " firenvim let g:firenvim_config = { \ 'globalSettings': { \ 'alt': 'all', \ }, \ 'localSettings': { \ '.*': { \ 'cmdline': 'firenvim', \ 'priority': 0, \ 'selector': 'textarea:not([readonly]):not([class="handsontableInput"]):not([wrap="off"]):not([rows="1"]):not([title="Replace"]):not([title="Search"]):not([name="message"]), \ div[role="textbox"]:not([aria-label="Search"])', \ 'takeover': 'always', \ }, \ '.*mail\.protonmail\.com.*': { 'priority': 9, 'takeover': 'empty', }, \ '.*church\.tools.*': { 'priority': 9, 'takeover': 'empty', }, \ '.*element\.io.*': { 'priority': 9, 'takeover': 'empty', }, \ '.*discord\.com.*': { 'priority': 9, 'takeover': 'once', }, \ '.*twitter\.com.*': { 'priority': 9, 'takeover': 'never', }, \ '.*openstreetmap\.org.*': { 'priority': 9, 'takeover': 'once', }, \ '.*openstreetmap\.de.*': { 'priority': 9, 'takeover': 'once', }, \ '.*github\.com.*': { 'priority': 9, 'takeover': 'once', }, \ \ '.*wikipedia\.org.*': { 'priority': 9, 'takeover': 'never', }, \ '.*wikidata\.org.*': { 'priority': 9, 'takeover': 'never', }, \ \ '.*docs\.google\.com.*': { 'priority': 9, 'takeover': 'never', }, \ '.*contacts\.google\.com.*': { 'priority': 9, 'takeover': 'never', }, \ '.*calendar\.google\.com.*': { 'priority': 9, 'takeover': 'empty', }, \ '.*notion\.so.*': { 'priority': 9, 'takeover': 'never', }, \ '.*cloud\.atomtoast\.xyz.*': { 'priority': 9, 'takeover': 'never', }, \ 'https://bigbluebutton.*': { 'priority': 9, 'takeover': 'never', }, \ 'https://dhall-lang.org.*': { 'priority': 9, 'takeover': 'never', }, \ 'https://aur.archlinux.org/acount.*': { 'priority': 9, 'takeover': 'never', }, \ \ '.*stackexchange\.com.*': { 'priority': 9, 'takeover': 'never', }, \ '.*stackoverflow\.com.*': { 'priority': 9, 'takeover': 'never', }, \ '.*com/questions/[0-9]+/.*': { 'priority': 9, 'takeover': 'never', }, \ '.*com/posts/[0-9]+/.*': { 'priority': 9, 'takeover': 'never', }, \ } \ } if exists('g:started_by_firenvim') nnoremap :call firenvim#focus_page() autocmd FocusLost,InsertLeave,BufLeave * ++nested call WriteSilent() function WriteSilent() let was_enabled=b:strip_whitespace_on_save DisableStripWhitespaceOnSave write if was_enabled EnableStripWhitespaceOnSave endif endfunction endif