Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: There's a level in Hell reserved for ________

by zengargoyle (Deacon)
on Mar 02, 2003 at 20:57 UTC ( [id://239895]=note: print w/replies, xml ) Need Help??


in reply to Re: There's a level in Hell reserved for ________
in thread There's a level in Hell reserved for ________

actually, i went looking last night, vim is definately scriptable to your hearts content. i found the totally-rockin 'taglist.vim' which provides sweet navigation through your files. i also saw scripts that changed the behavior of TAB depending on whether it was the first key pressed on a new line (indent), otherwise (word-complete), shift-TAB being (word-complete-backwards).

the scripts look something like:

" Tlist_Cleanup() " Cleanup all the taglist window variables. function! s:Tlist_Cleanup() if has('syntax') silent! syntax clear TagListTitle endif match none if exists('b:tlist_ftype') && b:tlist_ftype != '' let count_var_name = 's:tlist_' . b:tlist_ftype . '_count' if exists(count_var_name) let old_ftype = b:tlist_ftype let i = 1 while i <= s:tlist_{old_ftype}_count let ttype = s:tlist_{old_ftype}_{i}_name let j = 1 let var_name = 'b:tlist_' . old_ftype . '_' . ttype . +'_count' if exists(var_name) let cnt = b:tlist_{old_ftype}_{ttype}_count else let cnt = 0 endif while j <= cnt unlet! b:tlist_{old_ftype}_{ttype}_{j} let j = j + 1 endwhile unlet! b:tlist_{old_ftype}_{ttype}_count unlet! b:tlist_{old_ftype}_{ttype}_start let i = i + 1 endwhile endif endif " Clean up all the variables containing the tags output if exists('b:tlist_tag_count') while b:tlist_tag_count > 0 unlet! b:tlist_tag_{b:tlist_tag_count} let b:tlist_tag_count = b:tlist_tag_count - 1 endwhile endif unlet! b:tlist_bufnum unlet! b:tlist_bufname unlet! b:tlist_ftype endfunction

the deal with the syntax-highlighting is that if it knows what color to make something as soon as i type it (and knows when to change the color back to normal) then it has the brains to do further modifications like putting 'sub X {}' when you type sub (with cursor left on X), hit right-arrow or space and 'X' dissapears and cursor goes inside '{}' for anonymous sub, or type a subname and 'space' will take you to inside '{}'. i believe having highlighting (the way vim seems to do it) implies being able to smart-complete.

i hope cperl-mode is smart enough that if that were:

do { something(); } while <FOO # wouldn't get you do { something(); } while (<FOO>) {}

and now that i actually know vim has auto-complete (Ctrl-N and Ctrl-P in insert mode) i might be able to break myself of my love for short variable names...

i suggest anybody who uses vim go check out the Tips section on http://www.vim.org. there's even...

ASCII ART! +----------+ | | ******* | +----------+ **.......** | | | | **...........** +----|-----+ | *..*********..* | | *** *** +----------+ **++** **++** -------|> *++++++*******++++++* / *+++++++++++++++++++* / -----------\ *+++++++++++++++++++* / \ **+++++++++++++++** / \ ***+++++++++*** / \ ********* / \ / \ / ---------------------/

but i think we've gone way OT.

Replies are listed 'Best First'.
Re: There's a level in Hell reserved for ________
by jonadab (Parson) on Mar 03, 2003 at 12:08 UTC
    actually, i went looking last night, vim is definately scriptable to your hearts content

    Hmmm... Well, then, I'll have to move learning vim up into the part of my TODO list that might actually get done, then :-) It would be nice to have a second editor, for situations where Emacs isn't installed, especially for cases where I'm only working on a system for a short while, since installing Emacs takes so long...

    i hope cperl-mode is smart enough that if that were: do { something(); } while <FOO # wouldn't get you do { something(); } while (<FOO>) {}

    Yes, of course. And I only scratched the surface of the stuff it does for you.

    but i think we've gone way OT.

    I find it impossible to feel bad about going OT in a thread that started out as a place to rant.


    for(unpack("C*",'GGGG?GGGG?O__\?WccW?{GCw?Wcc{?Wcc~?Wcc{?~cc' .'W?')){$j=$_-63;++$a;for$p(0..7){$h[$p][$a]=$j%2;$j/=2}}for$ p(0..7){for$a(1..45){$_=($h[$p-1][$a])?'#':' ';print}print$/}

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://239895]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-19 11:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found