Lev Lvovsky wrote:

I'm sure there's a fancy word for this, but is there any way to pull text to the right?

suppose I have the following:

     COL1  INT,
     COL2  INT,
 COL3       INT,

I'd like to get "COL3" aligned to "COL1" and "COL2", but to do that, I need to put the cursor behind "COL3", hit space several times, and then align "INT" with the other "INTs". Can I put my cursor to the right of "COL3", and pull it over to "INT" on the right?


It sounds like you're interested in aligning text. For that may I suggest looking into Align.vim (and AlignMaps.vim, which come together).
To do the alignment, assuming that you're using spaces as delimiters:

 at the upper right hand corner, type  V
 move cursor to bottom right hand corner.
 type \tsp

If you're using tabs as delimiters, then use \tab instead of \tsp.

=====================================================


1. Get an up-to-date version of vimball and Align:

   [vimball]
        http://vim.sourceforge.net/scripts/script.php?script_id=1502
 -or-   http://mysite.verizon.net/astronaut/vim/index.html#VimBall
 (the mysite.verizon.net one will be the more recent version)

 [align]
        http://mysite.verizon.net/astronaut/vim/index.html#ALIGN

2) Remove the old vimball plugin and install the new one:

   Linux:
       cd /usr/local/share/vim/vim70
       /bin/rm plugin/vimball*.vim autoload/vimball*.vim doc/pi_vimball.txt
       mv (wherever it was downloaded)/vimball.tar.gz .
       gunzip vimball.tar.gz
       tar -xvf vimball.tar

   Windows:
Under Windows, check your runtimepath to determine where your vim 7.0's runtime directories are:

       vim
       :echo &rtp
       :q

The first directory is likely your personal plugins directory, the second one is your vim system directory.

       cd (to your vim system directory)
       del plugin\vimballPlugin.vim
       del autoload\vimball.vim
       del doc\pi_vimball.txt
       ren (wherever)\vimball.tar.gz vimball.tar.gz
       gunzip vimball.tar.gz
       tar -xvf vimball.tar

3) Install a new version of Align:
  vim Align.vba.gz
  :so %
  :q

Reply via email to