Skip to content

Instantly share code, notes, and snippets.

function! Group(char)
" open blank line on top of file and jump back
execute "normal! ggO\<Esc>\<C-O>"
" save current position
let p = getpos('.')
" from this line downward move all lines matching the pattern to top of file
.,$g//m0
" select all lines matching the pattern
normal! vip
" redirect output to standard register
@wellle
wellle / vimversion
Created April 27, 2014 17:20
vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr 13 2014 12:39:14)
MacOS X (unix) version
Included patches: 1-258
Compiled by welle@Welle-MBP.local
Normal version without GUI. Features included (+) or not (-):
+acl -farsi -mouse_netterm +syntax
-arabic +file_in_path -mouse_sgr +tag_binary
+autocmd +find_in_path -mouse_sysmouse +tag_old_static
-balloon_eval +float -mouse_urxvt -tag_any_white
#!/usr/bin/env php
<?php
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2010 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@wellle
wellle / append.vim
Last active March 17, 2023 13:02
Commands to append after (and insert before) any text object. http://redd.it/1z93ww
nnoremap <silent> <Leader>a :set opfunc=Append<CR>g@
nnoremap <silent> <Leader>i :set opfunc=Insert<CR>g@
function! Append(type, ...)
call feedkeys("`]a", 'n')
endfunction
function! Insert(type, ...)
call feedkeys("`[i", 'n')
endfunction
@wellle
wellle / gist:9247763
Created February 27, 2014 10:31
gbd settings (try for debugging tmux)
# We have scroll bars in the year 2012!
set pagination off
# Attach to both parent and child on fork
set detach-on-fork off
# Stop/resume all processes
set schedule-multiple on
@wellle
wellle / group.vim
Last active January 24, 2017 16:52
function! Group()
normal! l"ry$"ly0
redir => message
execute "silent %g/\\V" . escape(@l, '/') . "/d"
redir END
let cnt = matchstr(message, '\d\+')
execute "normal! ggO" . cnt . ' ' . @l . ' || ' . @r . "\<Esc>0"
endfunction
nnoremap <silent> <leader>g :call Group()<CR>
@wellle
wellle / yank.vim
Last active May 10, 2023 02:36
Yank without moving the cursor to the beginning of the yanked text
nnoremap <silent> y :<C-U>call MarkAndSetOpfunc()<CR>g@
vnoremap <silent> y :<C-U>call MarkYankAndJump()<CR>
function! MarkAndSetOpfunc()
let g:save_cursor = getpos(".")
set opfunc=YankAndJumpBack
endfunction
function! MarkYankAndJump()
let g:save_cursor = getpos(".")
java.lang.AssertionError: java.security.NoSuchAlgorithmException: MessageDigest MD5 implementation not found
at org.apache.harmony.xnet.provider.jsse.NativeCrypto.X509_NAME_hash(NativeCrypto.java:188)
at org.apache.harmony.xnet.provider.jsse.NativeCrypto.X509_NAME_hash_old(NativeCrypto.java:181)
at org.apache.harmony.xnet.provider.jsse.TrustedCertificateStore.hash(TrustedCertificateStore.java:417)
at org.apache.harmony.xnet.provider.jsse.TrustedCertificateStore.findCert(TrustedCertificateStore.java:377)
at org.apache.harmony.xnet.provider.jsse.TrustedCertificateStore.isTrustAnchor(TrustedCertificateStore.java:326)
at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.findTrustAnchorBySubjectAndPublicKey(TrustManagerImpl.java:307)
at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.cleanupCertChainAndFindTrustAnchors(TrustManagerImpl.java:237)
at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:184)
at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.che
# https://wiki.gentoo.org/wiki/Zsh/HOWTO
# TODO: split in separate files like https://github.com/ivyl/zsh-config
autoload -U compinit
compinit
export CORRECT_IGNORE='_*'
source $HOME/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
SOURCES=test.c
EXECUTABLE=test
CC=g++
CFLAGS=-c -Wall
LDFLAGS=
OBJECTS=$(SOURCES:.cpp=.o)
all: $(SOURCES) $(EXECUTABLE)
run: all