diff options
author | Bram Moolenaar <Bram@vim.org> | 2007-05-06 12:51:41 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2007-05-06 12:51:41 +0000 |
commit | 9e1d2839c64536528c10d2ffc0e744b1e3a4bdcb (patch) | |
tree | d2fc32779546d337b734f7fffde8a5eee4c32f69 /runtime/doc/usr_41.txt | |
parent | a9af0e6a0aaa3bb91f942be98c1086dd25412e48 (diff) | |
download | vim-git-9e1d2839c64536528c10d2ffc0e744b1e3a4bdcb.tar.gz |
updated for version 7.1a
Diffstat (limited to 'runtime/doc/usr_41.txt')
-rw-r--r-- | runtime/doc/usr_41.txt | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 652378d70..c9dc0efc3 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim version 7.0. Last change: 2007 Apr 26 +*usr_41.txt* For Vim version 7.1a. Last change: 2007 Apr 26 VIM USER MANUAL - by Bram Moolenaar @@ -1482,7 +1482,9 @@ commands (there are a few more commands with this restriction). For the :execute cmd |" do it With the '|' character the command is separated from the next one. And that -next command is only a comment. +next command is only a comment. For the last command you need to do two +things: |:execute| and use '|': > + :exe '!ls *.c' |" list C files Notice that there is no white space before the '|' in the abbreviation and mapping. For these commands, any character until the end-of-line or '|' is @@ -1491,9 +1493,19 @@ trailing whitespace is included: > :map <F4> o#include -To avoid these problems, you can set the 'list' option when editing vimrc +To spot these problems, you can set the 'list' option when editing vimrc files. +For Unix there is one special way to comment a line, that allows making a Vim +script executable: > + #!/usr/bin/env vim -S + echo "this is a Vim script" + quit + +The "#" command by itself lists a line with the line number. Adding an +exclamation mark changes it into doing nothing, so that you can add the shell +command to execute the rest of the file. |:#!| |-S| + PITFALLS |