Skip to content

Instantly share code, notes, and snippets.

" Name: delek
" Description: Interpretation of standard delek colorscheme.
" Original Author: David Schweikert <david@schweikert.ch>
" Maintainer: adscriven@gmail.com
" License: Vim License (see `:help license`)
" Last Updated: 2020-09-24 Iau 16:44
" * first draft -- maybe last? Diverges from the original.
" - 256/gui only -- no checks for color capability
" - 256 & gui colours should now look almost identical
@adscriven
adscriven / sylfaenol.vim
Last active September 25, 2020 23:03
Basic dark colorscheme with colours for limited syntax :-o with good separation. For non-Vim users and no-syntax-whiners when pair programming.
" colors/sylfaenol.vim
hi clear
let s:name = expand('<sfile>:t:r')
let colors_name = s:name
hi Normal ctermfg=249 ctermbg=233 cterm=NONE guifg=#b2b2b2 guibg=#121212 gui=NONE guisp=NONE
hi Boolean ctermfg=249 ctermbg=233 cterm=NONE guifg=#b2b2b2 guibg=#121212 gui=NONE guisp=NONE
hi Character ctermfg=249 ctermbg=233 cterm=NONE guifg=#b2b2b2 guibg=#121212 gui=NONE guisp=NONE
hi ColorColumn ctermfg=NONE ctermbg=0 cterm=NONE guifg=NONE guibg=#000000 gui=NONE guisp=NONE
hi Comment ctermfg=37 ctermbg=NONE cterm=NONE guifg=#00afaf guibg=NONE gui=NONE guisp=NONE
" :Recent -- list buffers first, + oldfiles, both in reverse time order
" <CR> opens a file or buffer
" <BS> starts a fuzzy search
" :Delete!, :Delfuzz! keeps lines
" :Delete, :Delfuzz removes lines
" :Delfuzz does a very nomagic search, and replaces white space with \.\*
" It's like the -e (exact) flag for fzf.
" :Delete doesn't use :keeppat because I like to highlight afterwards,
" and move to matches with n.
" textobj-indent.vim -- ic, ac, ai, ii, aI indentation text objects.
" https://gist.githubusercontent.com/adscriven/7deb37e1a5a42759d6e6d703ecda9475
" SUMMARY
" This plugin defines the following mappings for Operator-pending mode
" and Visual mode.
" ic -- select contiguous lines (i.e. stopping at paragraph
" boundaries) of the same indentation.
@adscriven
adscriven / indentpath.vim
Last active September 10, 2020 10:54
Echo the path to the cursor, in terms of indentation.
" indentpath.vim -- echo the indentation path to the cursor.
" https://gist.github.com/adscriven/6dcdb723e50e768d267986d0efd75c1f
" Public domain. 2020-09-10 Iau
" 2020-09-10 allow echoing lines verbatim with linebreaks
" 2020-09-02 change default separator from | to │
" 2020-09-01 s:fit(): remove unnecessary calculations
" 2020-09-01 s:truncpc(): handle multibyte
" 2020-09-01 s:echolist(): don't add padding to last item
" 2020-09-01 s:echolist(): invoke s:fit multiple times
@adscriven
adscriven / termedit.vim
Last active May 30, 2018 11:17
Edit files under the cursor in :terminal
" termedit.vim -- Edit a file under the cursor in a terminal window.
" https://gist.github.com/adscriven/1fde7e3aa362b8f9700677352e97f56e
" Public domain.
" [ ] add mappings for opening a terminal window and doing 'ls'
" REQUIREMENTS
" Vim 8.0.0693 or later with the +terminal feature.
" Supports bash with both vi and emacs keybindings, and cmd.exe.
@adscriven
adscriven / colortrans.vim
Last active May 21, 2018 22:57 — forked from MicahElliott/colortrans.py
Convert values between RGB hex codes and xterm-256 color codes.
" Port of colortrans.py
" https://gist.github.com/MicahElliott/719710
" Largely untested. Hopefully Micah did that :-)
let s:shorttorgb = [
\ '000000', '800000', '008000', '808000', '000080', '800080', '008080',
\ 'c0c0c0', '808080', 'ff0000', '00ff00', 'ffff00', '0000ff', 'ff00ff',
\ '00ffff', 'ffffff', '000000', '00005f', '000087', '0000af', '0000d7',
\ '0000ff', '005f00', '005f5f', '005f87', '005faf', '005fd7', '005fff',
\ '008700', '00875f', '008787', '0087af', '0087d7', '0087ff', '00af00',
" From:
" https://github.com/igemnace/vim-config/blob/master/cfg/plugin/quick-buffer.vim
" original problem: :B command that extends :b such that I don't have to hit *
function! QuickBuffer(pattern) abort
redraw
let p = substitute(a:pattern, '\s\+$', '', '')
if empty(p)
call feedkeys(":B \<C-d>")
return
@adscriven
adscriven / sessions.vim
Last active May 4, 2018 06:26
Define :SessionRestore and :SessionSave commands for Vim.
" sessions.vim -- Define :SessionSave and :SessionRestore.
" SUMMARY
" $ mkdir ~/.vim/session
" :SessionSave save the current session
" :SessionSave {name} save a session as g:sessions_dir/{name}
" :SessionRestore restore the current session
" :SessionRestore {name} restore the session from g:sessions_dir/{name}
"
" There is tab completion for {name}.
" vertregion.vim -- jump to the start and end of vertical regions
" SUMMARY
" Allow the cursor to move to the start or end of a vertical region of
" text. If you are familiar with <C-Up> and <C-Down> in Microsoft
" Excel to move to the edge of a data region, this will feel natural.
" INSTALLATION
" Chuck it in ~/.vim/plugin