Skip to main content

Home/ Groups/ VIM Editor
reckoner reckoner

GVim won't 'cd' to dropped file's dir - vim_use | Google Groups - 0 views

  • Andrew schrieb: > Is there a way to get GVim to auto-`cd` to a dropped file's directory? > My gripe is that when I `:sav` the edited file giving it a new name, it > ends up in my home directory, which *of course* is not what I'd want to > do. > I'm using version 7.0.237 on KDE 3.5 for Linux. > Thanks in advance, > Andrew     :h drag-n-drop hold down Shift while dropping the file. For similar situations, I need this often but not always, thus I mapped a function key to it:     :nn <F3> :cd %:p:h<cr>     :h ::p If you want it always, set 'autochdir'     :h 'acd
reckoner reckoner

Preexisting code indentation - Vim Tips Wiki - a Wikia wiki - 0 views

  • lternative: if your file has indent 4 and you want an indent of 3 and gg=G is not working as expected, try :set inde=indent(v:lnum)/4*3 then go ahead with the well known gg=G use tabs or spaces, doesn't matter
reckoner reckoner

SCMDiff - Highlight changed lines in a file via SCM diff command : vim online - 0 views

  • It allows you to quickly toggle (through a keybinding, Ctrl-D by default) the highlighting of changed lines in a file through an SCM's diff command.
  •  
    needed some hand tweaking on my part to get it to work
reckoner reckoner

Vimplugin - The best of two worlds [Vimplugin] - 0 views

  • Vimplugin is an Eclipse plugin that brings the power of the editor Vim to the Eclipse IDE. Vim is one of the most powerful editors around. But it is not an IDE. On the other hand, Eclipse is one of the most powerful IDEs. But its editor lacks many of the features vim offers. Vim is lean, Eclipse is extensible. So, just take the best of two worlds.
reckoner reckoner

Renumbering lists automatically within vim - 0 views

  •  (1) blah blah  (2) more blah blah (3) still more blah blah (4)... (5)... Now I finish point (2) and delete the line from my list. I manually renumber a long list for all points after (2). Does vim make this task any easier?
  • There's visincr... You can get visincr from:
  • Abusing the "\=" replacement evaluation described at    :help sub-replace-special you can do something like   :.,$s/(\zs\d\+\ze)/\=submatch(0)-1
reckoner reckoner

chamindra - marvim - 0 views

  •  "Give your most complex macros a name and store it for future recall and use" Problem statement(s): Can't remember those complex VIM macro sequences you use frequently?Wish you could save those macros beyond your immediate session? Wish you could share your VIM macros with each other? Why not templates as well in the same script?
  •  
    save vim macros
reckoner reckoner

Tip #805 - Windows: gvim as an external editor : vim online - 0 views

  • This tip provides a (Windows only) means of using gvim as an external editor for almost any other program. This script has been tested with Lotus Notes and Internet Explorer on Windows NT.
reckoner reckoner

Debugging Python in VIM- Peter's Blog - 0 views

  • Following my thoughts yesterday, here are some VIM python scripts to add python breakpoint and debugging features to VIM. With this set up the F7 key will set a breakpoint on a line of code, Shift-F7 will remove all breakpoints and Shift-F12 will execute a script in the python debugger. This only runs on windows as far as I know, because it uses the 'start' command to launch the debugger in a seperate process without VIM waiting for it to finish. This allows you to look through the source code (and fix it) while the debugging is still in progress.
reckoner reckoner

genutils - General utility functions : vim online - 0 views

  • This script provides many useful utility functions for buffers, windows and other misc things. I needed a place to share all the misc. utility functions so I renamed bufNwinUtils.vim and started adding these additional functions. I intend to create/collect many more useful functions and add to this script.
reckoner reckoner

Vamshi's Vim Notes - 0 views

  • Cursor line and more... * You can turn on cursor line and cursor columns ':set cursorline' ':set cursorcolumn'
  • * Pressing 'q:' or ':<Ctrl-f>' gives the command history window (list of previously executed commands in the current session) * Pressing 'q/' or '/<Ctrl-f>' gives the command history window (list of previously executed commands in the current session)
  • Note: to highlight special keywords we can use the match option as ':hi <MyGroup> ctermbg=red' ':mat <MyGroup> /<pattern>/' To clear these highlights do ':mat[ch]'
  • ...11 more annotations...
  • * '/<pattern1>\|<pattern2>' search for multiple patterns using OR '\|'
  • * Show lines matching word under cursor '[I'
  • Repositioning the Screen 'z' Move current line to top of screen 'z.' Move current line to center of screen 'z-' Move current line to bottom of screen
  • CaSe FOrmaTting "~" swaps the cAse of a single character "g~~" toggles the case of an entire sentence 'guu' or 'Vu' makes an entire sentence lowercase 'gUU' or 'VU' makes an entire sentence UPPERCASE 'vE~' flip case word 'vEU' upper case word 'vEu' lower case word 'ggguG' lower case entire file
  • '=}a' or '=a}' re-indents the current {.....} block relative to how the {, } have been indented General key syntax '=<motion>'
  • Navigating - "[c" will go to the line of the next difference "]c" will go to the line of the previous difference
  • One way to use this is to create a number list insert 1 'qa' 'yy' 'p' 'CTRL-A' on the new line to convert the 1 to a 2 'q' '20@a' and voila! You have number 1 to 22 pasted in your file
  • Three commands can be used to apply commands over multiple files ':argdo' ':windo' ':bufdo' 'argdo' applies a commands on all the files indicated by the 'args' command ':args *.[ch]' ':argdo %s/<pattern1>/<pattern2>/ge | update' The 'e' option suppresses errors if <pattern1> is not found in a
  • You can easily start editing at a previously saved state/views by using the '-S' arguement as 'vim -S session.vim' To create a session at some point, you can use the command ':mks[ession][!] <filename>'
  • :help local-additions' shows you the entries for the local help file
  • The 'set' options can be traced as follows ':verbose set ' - this helps trace from which file this option has been set We can figure out for a particular group what 'autocmd' has been set ':autocmd ' - this shows all that has been set for a particular group & filetype
reckoner reckoner

IPython - User - A useful couple of scripts - 0 views

  • ERRCONDS = select.POLLHUP|select.POLLERR
    • reckoner reckoner
       
      this part doesn't work on Windows
  •  
    sadly, doesn't work with Windows.
reckoner reckoner

Debugger for Vim Code? - vim_use | Google Groups - 0 views

  • >  I was wondering if there's any debugger written specifically for Vim >  code?   I've got a thorny problem on a vim plugin on Solaris (I can't >  share the code) and stepping through the code would be lovely (though I >  realize this could be difficult, given the nature of vim). As I am sure you found out from Tony's post Vim has a built in debugger for Vim scripts. What I would suggest to you is to download and use this plugin by Hari: " BreakPts - Debug Vim Scripts " Author: Hari Krishna Dara " http://www.vim.org/scripts/script.php?script_id=618 I use it regularly and love it. HTH, Dave
reckoner reckoner

Vim Cookbook - 0 views

  • This is the Vim cookbook page. It contains short recipes for doing many simple and not so simple things in Vim. You should already know the basics of Vim, however each command is explained in detail. Each set of instructions is a complete package. Feel free to pick and choose what you need.
« First ‹ Previous 61 - 80 of 136 Next › Last »
Showing 20 items per page