This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Pick a different highlighting group by adding this in your vimrc: | |
" | |
" highlight link fuzzyMatch <group> | |
" | |
" The "default" only makes the link if it's not already set. | |
" | |
highlight default link fuzzyMatch Search | |
" The components of the command definition: | |
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Adapted from https://vi.stackexchange.com/a/16111 | |
" | |
command! -nargs=1 DumpHighlight call s:DumpHighlight(<q-args>) | |
function! s:DumpHighlight(filename) abort | |
let output = execute('hi', 'silent!') | |
let colors_name = fnamemodify(a:filename, ':r') | |
let highlights =<< trim eval EOF | |
hi clear |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Place this file in autoload/put_at_end.vim. | |
" | |
" Create mappings in normal mode that call the function with the string to append: | |
" | |
" nnoremap <silent> z, :call put_at_end#Mapping(',')<cr> | |
" nnoremap <silent> z; :call put_at_end#Mapping(';')<cr> | |
" nnoremap <silent> z) :call put_at_end#Mapping('),')<cr> | |
" | |
" If you have repeat.vim installed, you can repeat the append with a . | |
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Pressing zj and zk duplicate a single line below and above the cursor, | |
" respectively. This is pretty common functionality and simple to implement. | |
" | |
" Pressing zJ and zK duplicates a "block" of code, which is defined by indent. | |
" In the languages from the s:indent_based_languages list, a "hanging" indent | |
" is taken. Example: | |
" | |
" def one(self): | |
" pass | |
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
current_color='' | |
last_color='' | |
while :; | |
do | |
current_color=`curl -s 'http://api.thingspeak.com/channels/1417/field/1/last.txt'` | |
if [ "$current_color" != "$last_color" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"app/initializers/*.js": { | |
"type": "initializer" | |
}, | |
"app/models/*.js": { | |
"type": "model", | |
"alternate": "app/adapters/{}.js", | |
}, | |
"app/adapters/*.js": { | |
"type": "adapter", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let s:tbl = { | |
\ 'bold': { | |
\ '0': '𝟎', '1': '𝟏', '2': '𝟐', '3': '𝟑', '4': '𝟒', | |
\ '5': '𝟓', '6': '𝟔', '7': '𝟕', '8': '𝟖', '9': '𝟗', | |
\ 'A': '𝐀', 'B': '𝐁', 'C': '𝐂', 'D': '𝐃', 'E': '𝐄', | |
\ 'F': '𝐅', 'G': '𝐆', 'H': '𝐇', 'I': '𝐈', 'J': '𝐉', | |
\ 'K': '𝐊', 'L': '𝐋', 'M': '𝐌', 'N': '𝐍', 'O': '𝐎', | |
\ 'P': '𝐏', 'Q': '𝐐', 'R': '𝐑', 'S': '𝐒', 'T': '𝐓', | |
\ 'U': '𝐔', 'V': '𝐕', 'W': '𝐖', 'X': '𝐗', 'Y': '𝐘', | |
\ 'Z': '𝐙', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ~/.vim/ftplugin/ruby/private_methods.vim | |
" Browse through https://github.com/AndrewRadev/Vimfiles to find any future updates. | |
" Define what color the private methods will have | |
hi rubyPrivateMethod cterm=underline gui=underline | |
function! s:MarkPrivateArea() | |
if empty(prop_type_get('private_method', {'bufnr': bufnr()})) | |
call prop_type_add('private_method', { | |
\ 'bufnr': bufnr(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ~/.vim/ftplugin/ruby/textprop_demo_1.vim | |
" Define what color the private methods will have | |
hi rubyPrivateMethod cterm=underline gui=underline | |
function! RubyMarkPrivateArea() | |
if empty(prop_type_get('private_method', {'bufnr': bufnr()})) | |
call prop_type_add('private_method', { | |
\ 'bufnr': bufnr(), | |
\ 'highlight': 'rubyPrivateMethod', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" This file is supposed to be saved as "~/.vim/ftplugin/eruby.vim". If desired, parts of it can be | |
" picked and saved into separate files in the same directory as long as they start with "eruby_", | |
" for example "~/.vim/ftplugin/eruby_surroundings.vim". | |
" Surround mappings. The character defines the mapping. Most of these are meant for use in visual | |
" mode to add a wrapping, although they can probably be used otherwise as well. | |
" | |
" These ones let you wrap a piece of text on a line with erb <% %> markers. The last one is | |
" particularly useful for adding translations in the place of hardcoded strings. | |
" |