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 g:startify_custom_header = [ | |
\ ' ________ __ __ ', | |
\ ' __ /\_____ \/\ \\ \ ', | |
\ ' __ __ /\_\ ___ ___ \/___//''/''\ \ \\ \ ', | |
\ ' /\ \/\ \\/\ \ /'' __` __`\ /'' /'' \ \ \\ \_ ', | |
\ ' \ \ \_/ |\ \ \/\ \/\ \/\ \ /'' /''__ \ \__ ,__\', | |
\ ' \ \___/ \ \_\ \_\ \_\ \_\ /\_/ /\_\ \/_/\_\_/ ', | |
\ ' \/__/ \/_/\/_/\/_/\/_/ \// \/_/ \/_/ ', | |
\ '', | |
\ '', |
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
for cs in ['zenburn', 'tango256', 'default'] | |
try | |
execute 'colorscheme' cs | |
break | |
catch | |
endtry | |
endfor |
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
function! sy#repo#get_stats() abort | |
if !exists('g:sy_path') || !has_key(g:sy, g:sy_path) | |
return [-1, -1, -1] | |
endif | |
return g:sy[g:sy_path].stats | |
endfunction |
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
function! s:count_characters(bang) range abort | |
let nchars = 0 | |
let lines = a:bang ? range(1, line('$')) : range(a:firstline, a:lastline) | |
for line in lines | |
let nchars += strlen(getline(line)) | |
endfor | |
if a:bang | |
echomsg '>>> The file contains '. nchars .' characters.' |
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
function! GoTags() abort | |
let files = substitute(glob('`find -name "*.go" -not -path "*/goeg/*" 2> /dev/null`'), '\n', ' ', '') | |
let tempfile = tempname() | |
call system('gotags '. files .' > '. tempfile) | |
call rename(tempfile, 'tags') | |
echom '>> Go tags updated!' | |
endfunction | |
command Gotags :call GoTags() |
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
package main | |
import "fmt" | |
func main() { | |
fmt. | |
} |
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
autocmd BufRead,BufNewFile ~/foobar/quux/something_else/* | |
\ if &filetype == 'gitcommit' | | |
\ setlocal textwidth=72 | | |
\ else | | |
\ setlocal textwidth=120 | | |
\ endif |
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
fun! Foo() range | |
execute a:firstline .','. a:lastline .'normal IOH NOES' | |
endfun | |
com! -range Foo <line1>,<line2>call Foo() |
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
" style 1 | |
if exists('b:loaded') | |
finish | |
endif | |
let b:loaded = 1 | |
" style 2 | |
if exists('s:counter') |
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
" style 1 | |
if exists('b:loaded') | |
finish | |
endif | |
let b:loaded = 1 | |
" style 2 | |
if exists('s:counter') |
OlderNewer