index edit log

debugging viml related stuff

which viml lines get executed?:

vim -V20/tmp/log

Then have a look at the log

debugging viml:

debug expr
E.g :debug RunCommand args

Then use c(ontinue) s(tep) n(ext) q(uit) i(nterrupt) f(inish), see :h debug Also see :h :breakadd

Note: After starting the debugger you can run arbitrary viml code in the command line shown by the debugger


  echom string(thing)
  echoe string(thing)

Then you have the traces in :messages log always

debugging syntax scripts: Note: echo lines are ignored by Vim. However you can run an indentation function manually and read them:

fun MyIndent(lnum)
  echo 'debug ..'
  return 1
set indentexpr=MyIndent(v:lnum)
" debug indentation of current line:
echo MyIndent(line('.'))

error messages like 23.34.23 line 3: This mean that the methods 23 34 23 are memebers of dictionaries. You can view the code by :function{23}

where has a mapping been defined?:

  :verbose map

Has a plugin been loaded?: Check :scriptnames

A mapping does not work the way it should?: Has it been (re)mapped? :verbose map {lhs} shows where a mapping has been set last. Maybe a second plugin is overriding a mapping.




.vimrc: Add finish to make vim skip rest of file. {{{if 0 ... Also see commenting.