History
Article Edit this page Discussion

Really basic RCS interaction from within vim

From Vim Tips Wiki

(Redirected from VimTip366)
Jump to: navigation, search

Tip 366 Previous Next Created: November 8, 2002 Complexity: basic Author: Peter Version: 6.0


I've looked all around and haven't found RCS functions built into vim (which surprises me, really), so I looked more and found some almost working RCS scripts for text-mode. Key there is almost. It's still a kludge, but it works without too much hassle.

I've chosen F1 and F2, because I never use those keys for what they are intended. I use :help for a command reference, not for a tutorial style thing. So, use some discretion. Also, the write command could just as easily have been a :write!, but I decided against that in the case of files that weren't checked out. You should check them out, first, and they should be writable.

map <F1> :write %<CR>:!ci -l %<CR>:edit!<CR>
map <F2> :!co -l %<CR>:edit!<CR>

New RCS files work just fine with the first mapping.

There would be some use to creating the RCS directory, if it's not already there, but I don't see an "if exists and is directory" function, right now.

There's a good menu-driven rcs client for graphical vim, but I hate menus and graphical interfaces.

[edit] Comments

If you are referring to rcs-menu.vim, even though it has a menu/graphical interface, it also creates mappings to do the same operations, which to me is more useful. So I guess you really get the best of both worlds that way.


> but I don't see an "if exists and is directory" function, right now.

How about isdirectory()?

if isdirectory("c:/vim/vimfiles/")
 "dir exists
endif

See script#360 rcsdiff.vim for visual rcsdiff. Integrates Vim's diffsplit with RCS.


Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto Wiki
Doctor Who
Legend of Zelda Wiki
Terminator Wiki
Everquest II Wiki
Mystery Science Theater 3000
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions
Send this article to a friend
"Really basic RCS interaction from within vim"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation