Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use /bin/view as it is a safe way to view text files and not have accidental changes persist once I am finished.

/bin/view seams to be lack features that normal vim has. Is there a way to start vim in read only mode, or start /bin/view with visual mode.

I want to be able to select text and paste it with out having to use my mouse. Visual mode make it so easy to do that.

The problem I am having is related to CentOS / redhat Linux distros, is the -visual in view.

# vim --version | grep visual
+user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace 
# view --version | grep visual
-textobjects -title -toolbar -user_commands -vertsplit -virtualedit -visual
share|improve this question
view is a link (usually symbolic these days) to vim that runs vim in read-only mode. Your view seems to be linked to a different vim than the one you get from executing "vim". Take a look at the update-alternatives(8) man page to see how to fix that. – garyjohn Feb 28 '12 at 17:11
up vote 12 down vote accepted

See $ vim --help for Vim's many launch arguments.

For launching Vim in read only mode that would be:

$ vim -R filename


$ view and $ vim -R seem to be one and the same by way of symbolic links. I'm not sure what features you'll gain from running $ vim -R that you don't have with $ view.

Here, on Ubuntu, I can visually select stuff in both.

share|improve this answer
In centos view and vim -R are not the same. view is compiled with -visual for some reason. – nelaar Mar 1 '12 at 6:43

If you forgot the -R option when start up vim, you can use:

:set ro
share|improve this answer

If your goal is simply not to overwrite the original file, you can vim's read from stdin feature:

cat filename | vim -
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.