Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
ephphatha
Dec 18, 2009




astr0man posted:

Absolute basics
Return to normal mode, and navigate to the start of the word. In normal mode, the w and b move the cursor forward and backward by one word at a time respectively. Place the cursor on the start of the word rtmacs, and still in insert mode type x.

I think that should refer to normal mode.

All these nice .vimrc files are great but I interact with about 10 servers daily and 8 of them only have vi installed (with no possibility of installing vim). Does anyone have a nice example of a .vimrc/.exrc combo?

For me it's just:
code:
.exrc:
set number

.vimrc:
@source .exrc
Since I haven't been bothered to set up something fancy.

Adbot
ADBOT LOVES YOU

ephphatha
Dec 18, 2009




My .vimrc/.exrc combo is slightly more complex now that I had some motivation to do it. One thing I'm wondering though is is there any danger to using map! in this way?

code:
.exrc
  1 set number
  2
  3 set autoindent
  4
  5 set hardtabs=2
  6 set tabstop=2
  7 set shiftwidth=2
  8
  9 map! <tab> <space><space>

.vimrc
  1 source $HOME/.exrc
  2 unmap! <tab>
  3
  4 nnoremap <leader>ev :split $MYVIMRC<cr>
  5 nnoremap <leader>sv :source $MYVIMRC<cr>
  6
  7 syntax on
  8
  9 set expandtab
 10 set smartindent
 11
 12 colorscheme wombat

ephphatha
Dec 18, 2009




Civil Twilight posted:

Is there a reason to do that when you have expandtab set?

vi doesn't have an expandtab option.

  • Locked thread