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
" Set b:formatprg to emulate a setlocal for formatprg | |
if exists('g:loaded_gq') || &cp || v:version < 700 | |
finish | |
endif | |
let g:loaded_gq = 1 | |
function! s:gq(type, ...) | |
let formatprg = &formatprg | |
let &formatprg = get(b:, 'formatprg', &formatprg) |
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
if exists('b:loaded_phpthis') || &cp | |
finish | |
endif | |
let b:loaded_phpthis = 1 | |
if !exists("b:undo_ftplugin") | |
let b:undo_ftplugin = "" | |
endif | |
function! s:synnames(...) abort |
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
" Adapation form http://stackoverflow.com/a/1423394/438329 | |
if exists('b:loaded_cssfold') | |
finish | |
endif | |
let b:loaded_cssfold = 1 | |
let b:width = 25 | |
nnoremap <silent> <buffer> >s :<c-u>let b:width+=v:count1<cr><c-l> | |
nnoremap <silent> <buffer> <s :<c-u>let b:width-=v:count1<cr><c-l> |
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
" Quick Replace | |
" Makes *``cgn like workflows faster by automatically moving to next match. Repeat with `.` | |
" | |
" Requires repeat.vim | |
" | |
" Example mappings: | |
" nmap cm <Plug>(quick-replace) | |
" xmap C <Plug>(quick-replace) | |
" | |
" mnemonic: cm for change matches |
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
*cupcake.txt* SQL query runner | |
Author: Peter Rincker *cupcake-author* | |
License: Same terms as Vim itself (see |license|) | |
This plugin is only available if 'compatible' is not set. | |
============================================================================== | |
*cupcake* |
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
#!/usr/bin/env python | |
# put this file at ~/.vim/compiler.py | |
from __future__ import print_function | |
from sys import argv, exit | |
if len(argv) != 2: | |
exit(1) |
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
" Inspired by Tim Pope's commentary.vim | |
" | |
" Uses b:commentstring or 'commentstring' as the comment pattern | |
" example: | |
" let &commentstring = '/*%s*/' | |
nnoremap gcc :<c-u>.,.+<c-r>=v:count<cr>call <SID>toggleComment()<cr> | |
nnoremap gc :<c-u>set opfunc=<SID>commentOp<cr>g@ | |
xnoremap gc :call <SID>toggleComment()<cr> |
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
" FancySmancyComment(text, fill_char, width) | |
" Create comment string with centered text | |
" All arguments are optional | |
function! FancySmancyComment(...) | |
let text = get(a:000, 0, '') | |
let fill = get(a:000, 1, '-')[0] | |
let width = get(a:000, 2, 80) - len(printf(&commentstring, '')) - len(text) | |
let left = width / 2 | |
let right = width - left | |
put=printf(&commentstring, repeat(fill, left) . text . repeat(fill, right)) |
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
" Put inside ~/after/plugin/matchit.vim | |
if exists('g:loaded_after_matchit') || !has('syntax') || &cp || v:version < 700 | |
finish | |
endif | |
let g:loaded_after_matchit = 1 | |
function! s:synnames(...) abort | |
if a:0 | |
let [line, col] = [a:1, a:2] | |
else |
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
" put in ~/.vim/ftplugin/php_man.vim | |
" Will map K to show signature on commandline. | |
" Will also attempt to show signature while typing. | |
" | |
" Set g:php_quick_man_color = 0 to disable color | |
" Set g:php_quick_man_insert_mode = 0 to disable insert mode signature | |
if exists('b:ftplugin_php_man') | |
finish | |
endif |
OlderNewer