Skip to content

Instantly share code, notes, and snippets.

- [Info] {Wed 20 2013 09:36:09} Searching for win by name /var/www/mopals/src/MoPals/Bundle/Controller/SurveyController.php
- [Info] {Wed 20 2013 09:36:09} Win 1, name /var/www/mopals/src/MoPals/Bundle/Controller/SurveyController.php
- [Info] {Wed 20 2013 09:36:09} Returning window number 1
- [Info] {Wed 20 2013 09:36:09} Found connection from ('127.0.0.1', 38118)
- [Debug] {Wed 20 2013 09:36:09} Command: context_names -i 1
- [Debug] {Wed 20 2013 09:36:09} Response: <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_names" transaction_id="1"><context name="Locals" id="0"></context><context name="Superglobals" id="1"></context></response>
- [Debug] {Wed 20 2013 09:36:09} Available context names: {0: 'Locals', 1: 'Superglobals'}
- [Debug] {Wed 20 2013 09:36:09} Command: step_into -i 2
- [Debug] {Wed 20 2013 09:36:09} Response: <?xml version="1.0" encoding="iso-8859-1"?>
@qstrahl
qstrahl / vdebug.1.log
Created February 28, 2013 14:52
- Place 3 breakpoints - Begin session - Run to next breakpoint - Exit
- [Info] {Thu 28 2013 09:48:22} Searching for win by name /var/www/mopals/src/MoPals/Bundle/Controller/SurveyController.php
- [Info] {Thu 28 2013 09:48:22} Win 1, name /var/www/mopals/src/MoPals/Bundle/Controller/SurveyController.php
- [Info] {Thu 28 2013 09:48:22} Returning window number 1
- [Info] {Thu 28 2013 09:48:22} Found connection from ('127.0.0.1', 58334)
- [Info] {Thu 28 2013 09:48:22} Updated line number of breakpoint 11008 to 676
- [Info] {Thu 28 2013 09:48:22} Updated line number of breakpoint 11007 to 664
- [Info] {Thu 28 2013 09:48:22} Updated line number of breakpoint 11006 to 653
- [Info] {Thu 28 2013 09:48:22} Registering 3 breakpoints with the debugger
- [Debug] {Thu 28 2013 09:48:22} Command: breakpoint_set -i 1 -t line -f file:///var/www/mopals/src/MoPals/Bundle/Controller/SurveyController.php -n 676 -s enabled
- [Debug] {Thu 28 2013 09:48:22} Response: <?xml version="1.0" encoding="iso-8859-1"?>
@qstrahl
qstrahl / vdebug.2.log
Created February 28, 2013 15:15
- Start debug session - :b to SurveyController.php - Move to line 653 - Run to cursor - Exit
- [Info] {Thu 28 2013 10:11:30} Searching for win by name /var/www/mopals/src/MoPals/Bundle/Controller/SurveyController.php
- [Info] {Thu 28 2013 10:11:30} Win 1, name /var/www/mopals/src/MoPals/Bundle/Controller/SurveyController.php
- [Info] {Thu 28 2013 10:11:30} Returning window number 1
- [Info] {Thu 28 2013 10:11:30} Found connection from ('127.0.0.1', 58501)
- [Debug] {Thu 28 2013 10:11:30} Command: context_names -i 1
- [Debug] {Thu 28 2013 10:11:30} Response: <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_names" transaction_id="1"><context name="Locals" id="0"></context><context name="Superglobals" id="1"></context></response>
- [Debug] {Thu 28 2013 10:11:30} Available context names: {0: 'Locals', 1: 'Superglobals'}
- [Debug] {Thu 28 2013 10:11:30} Command: step_into -i 2
- [Debug] {Thu 28 2013 10:11:30} Response: <?xml version="1.0" encoding="iso-8859-1"?>
@qstrahl
qstrahl / custom-wincmd-equals.vim
Last active December 17, 2015 10:28
Overload of Vim's default `<C-W>=` normal command that sets the preview window's height to `&previewheight`
function! s:CustomWincmdEquals(visual)
try
let w = winnr()
wincmd P
exe &previewheight.'wincmd _'
exe w.'wincmd w'
catch /^E441:/
continue
finally
return "\<C-W>=" . (a:visual ? 'gv' : '')
@qstrahl
qstrahl / diff-mappings.vim
Last active December 21, 2015 13:09
Better, default-compatible mappings for diff mode
"" Override default diff normal commands to allow count specifying which diffed window to target
nno do :<C-U>exe 'diffget' v:count ? get(filter(tabpagebuflist(), 'getbufvar(bufname(v:val), "&diff")'), v:count) : '' '<Bar> diffupdate'<CR>
nno dp :<C-U>exe 'diffput' v:count ? get(filter(tabpagebuflist(), 'getbufvar(bufname(v:val), "&diff")'), v:count) : '' '<Bar> diffupdate'<CR>
"" Add a shortcut to :diffupdate
nnoremap du :<C-U>diffupdate<CR>
@qstrahl
qstrahl / minimal-status-and-tab-lines.vim
Last active December 30, 2015 03:49
Cool statusline and tabline settings with fugitive support
function! MyTabLine()
let s = ''
let s .= '%#TabLine#'
let s .= '%<'
let s .= '%(%{fnamemodify(getcwd(), ":~")} %)'
if (exists('*fugitive#buffer'))
let s .= '%(⌥ %{exists("b:git_dir")?fugitive#head(7):""} %)'
endif
let s .= '%='
@qstrahl
qstrahl / minimal-autocomplete.vim
Last active February 24, 2024 06:43
Super lightweight autocomplete using vim's built-in <C-n> completion
set cot=menu,menuone
ino <BS> <BS><C-r>=getline('.')[col('.')-3:col('.')-2]=~#'\k\k'?!pumvisible()?"\<lt>C-n>\<lt>C-p>":'':pumvisible()?"\<lt>C-y>":''<CR>
ino <CR> <C-r>=pumvisible()?"\<lt>C-y>":""<CR><CR>
ino <Tab> <C-r>=pumvisible()?"\<lt>C-n>":"\<lt>Tab>"<CR>
ino <S-Tab> <C-r>=pumvisible()?"\<lt>C-p>":"\<lt>S-Tab>"<CR>
augroup MyAutoComplete
au!
au InsertCharPre * if
@qstrahl
qstrahl / gnome-terminal-cursor.vim
Created November 21, 2014 16:38
Default-shape-agnostic cursor change for gnome-terminal and vim
silent! let s:default_cursor = system('gconftool-2 --get /apps/gnome-terminal/profiles/Default/cursor_shape')
augroup GnomeTerminalCursor
au!
au InsertEnter * silent! execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam"
au InsertLeave,VimLeave * silent! execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape" s:default_cursor
augroup END
@qstrahl
qstrahl / format-javascript-with-js-beautify.vim
Created August 27, 2015 16:25
Make gq format your javascript with js-beautify
"" This file goes in after/indent/javascript.vim
function! MyJavascriptFormatter (lnum, count)
if mode() == 'i'
return 1
elseif synIDattr(synIDtrans(synID(line('.'), col('.'), 0)), 'name') == 'Comment'
return 1
endif
let l:options = []
@qstrahl
qstrahl / safesearch.vim
Last active September 2, 2015 18:55
safesearch.vim: start a search safely, without the risk of clobbering the last pattern
"" safesearch: start a search in vim without overwriting the last pattern
"" trivial? Yup. Useful? Ehhh maybe.
function! s:SafeSearch ()
augroup SafeSearch
autocmd CursorMoved,CursorMovedI,InsertEnter,CursorHold,CursorHoldI,CmdWinEnter,CmdWinLeave,WinEnter,WinLeave * call <SID>Teardown()
augroup END
let s:pattern = @/
return '/'
endfunction