Compare commits

...

335 Commits

Author SHA1 Message Date
Bjorn Winckler d9d242b00f Snapshot 34 2008-08-16 17:47:30 +02:00
Bjorn Winckler a614dfbfcd Reorder preferences panel
"Use login shell" is now enabled by default and has been moved to the
Advanced pane.  Also, when clicking this or the "Use ATSUI renderer"
button the preload cache is rebuilt.
2008-08-16 16:27:25 +02:00
Bjorn Winckler d72aaeda7f Remove make-snapshot.sh and README-snapshot.sh 2008-08-16 14:36:15 +02:00
Bjorn Winckler 90377d2495 About dialog box shows "Custom Version" 2008-08-15 16:47:41 +02:00
Bjorn Winckler 8b385ca122 Limit scroll wheel message frequency
This avoids clogging up the DO messaging system on fast machines with
high resolution scroll wheels (or track pads).
2008-08-15 21:36:58 +02:00
Michael Wookey 94c7edebd7 Paragraph tidy up in gui_mac.txt
* Some paragraphs weren't formatted properly for the correct line
   length.
 * Fixed a small spelling mistake (know -> known).
2008-08-14 20:24:09 +02:00
Bjorn Winckler d70f67e5b9 Release text storage only if text view class is MMTextView 2008-08-14 19:24:09 +02:00
Bjorn Winckler 03c5dada39 Insert Vim state message first on output queue when flushing 2008-08-14 19:11:58 +02:00
Bjorn Winckler 0cec396a20 Use bundle path for main connection name
This is to make it easier to run two different versions of MacVim
simultaneously.
2008-08-14 16:50:12 +02:00
Bjorn Winckler 50be9d4227 Avoid "dropping incoming DO message ..." being logged
These warnings were caused by a Vim process sending a DO message and
then immediately exiting so that the process would some times die before
the message was received by MacVim.
2008-08-14 18:32:28 +02:00
Ben Schmidt a689202f4e Fix Leopard pty problems
Problem: Pseudo TTYs (ptys) are not successfully allocated on Leopard
         (or when Vim is compiled on Leopard).
Solution: Do not attempt to use SVR4-compatible ptys on Mac OS X even
          though configure may detect their presence.
2008-08-14 12:45:41 +02:00
Jjgod Jiang 41e6389b83 Fix rounding problem in ATSUI renderer
This problem will cause characters with descender (like 'g')
to be drawn a little bit lower than the correct place. Thus
will result some extra pixels after the line is cleared.
2008-08-14 11:02:27 +08:00
Bjorn Winckler 4c615b9622 Fix compilation problems on OS X 10.4 2008-08-13 01:03:57 +02:00
Bjorn Winckler c1f4a11e10 Add ATSUI renderer option to advanced prefs 2008-08-13 00:25:55 +02:00
Bjorn Winckler dcd91fe279 Remove duplicate code in text renderers
Most of the code shared between the text renderers now resides in a
"helper" object.  This way it will be a lot easier to maintain several
renderers at once.

As an added bonus, the ATSUI renderer now has mouse support as well as
drag-n-drop support.
2008-08-12 23:54:06 +02:00
Bjorn Winckler 452e41f92e Now works to set 'linespace' in [g]vimrc 2008-08-12 21:18:55 +02:00
Bjorn Winckler d58cb64b76 Stop using deprecated Cocoa APIs 2008-08-12 21:18:23 +02:00
Bjorn Winckler ee84ad6010 Remove unused method 2008-08-12 20:47:16 +02:00
Bjorn Winckler 055d07bd87 Change Quickstart slider to checkbox in advanced prefs 2008-08-12 20:18:40 +02:00
Bjorn Winckler 1611954a47 Remove NSLog 2008-08-11 21:37:36 +02:00
Bjorn Winckler 0a0f80b2c0 Clear preload cache on "login shell" option changes 2008-08-11 21:32:41 +02:00
Bjorn Winckler 6f0611c29a Start and stop FS events if needed when preload cache size changes 2008-08-11 20:18:47 +02:00
Bjorn Winckler 3420b3b4d8 Smaller FS event latency, cancel previous requests on FS event 2008-08-11 20:17:47 +02:00
Bjorn Winckler 1b68724361 Use FS Streams to watch modifications in ~/.vim 2008-08-11 20:16:47 +02:00
Bjorn Winckler 550e75eed2 Enable cross compilation in Xcode project
Deployment target is OS X 10.4, development SDK is current OS version.
2008-08-11 20:15:47 +02:00
Bjorn Winckler 7e36001233 Change a few toolbar icons 2008-08-11 20:14:47 +02:00
Bjorn Winckler 4f1446124f Missing toolbar icon fallback code fix 2008-08-11 20:13:48 +02:00
Bjorn Winckler 232720a611 Change pwd if file is opening in an "unused" editor
When opening a file from Finder, set the pwd to the directory the file
resides in but only if the editor window is unused (e.g. it doesn't
already have files open in it).
2008-08-10 21:16:31 +02:00
Bjorn Winckler 3c918888d7 Change "untitled window" detection heuristic
Also change terminology to "unused editor" instead of "untitled window"
since the detction has nothing to do with the window's title.
2008-08-10 21:12:34 +02:00
Bjorn Winckler 772859fcca Current directory handling changes
New processes default to using the user's home directory as the current
directory.  When opening files opened from Finder the current directory
is changed to that of the first file opened.
2008-08-10 18:04:27 +02:00
Bjorn Winckler 85c6b71293 "New Window" item on Dock menu activates MacVim 2008-08-10 16:50:02 +02:00
Bjorn Winckler 0fae0b0238 Version strings changed to 7.2 2008-08-10 16:09:17 +02:00
Bjorn Winckler 43ebeed946 Merge upstream 2008-08-09 19:56:00 +02:00
vimboss 0dceccaafb updated for version 7.2-000 2008-08-09 17:55:22 +00:00
vimboss 7d5860b32b updated for version 7.2c-003 2008-08-08 11:45:39 +00:00
vimboss 1c8fc078a3 updated for version 7.2c-002 2008-08-08 10:59:17 +00:00
vimboss c7fead45e0 updated for version 7.2c-001 2008-08-08 10:36:31 +00:00
vimboss ebb92ddd72 updated for version 7.2c-000 2008-08-06 17:06:04 +00:00
vimboss 3047db21af updated for version 7.2b-030 2008-08-06 13:28:57 +00:00
vimboss d128618aba updated for version 7.2b-029 2008-08-06 13:03:07 +00:00
vimboss 764d5e5121 updated for version 7.2b-028 2008-08-06 12:37:44 +00:00
vimboss 2d003da317 updated for version 7.2b-027 2008-08-06 12:19:26 +00:00
Bjorn Winckler 79e728785f Deprecate "Force New Window" menu 2008-08-03 21:32:30 +02:00
Bjorn Winckler 2c9ae326a0 Add "Advanced" preferences pane
The "Advanced" pane can be used to control the preload cache size.
2008-08-03 21:27:30 +02:00
Bjorn Winckler 705ddcf213 Rebuild cache when vimrc/gvimrc files have been modified 2008-08-02 22:00:22 +02:00
Bjorn Winckler ad06dcbb69 Modify how and when preloaded windows open
This hopefully fixes the bug where a preloaded window sometimes failed
to ever show up but MacVim would still think that it was showing.
2008-08-02 19:47:35 +02:00
Bjorn Winckler 5c2795baae More file opening options (plus quickstart feature)
The preferences panel allow for more ways to open files from other
applications.  This is controlled by three user preferences:
  - MMOpenInCurrentWindow
  - MMOpenLayout
  - MMVerticalSplit
These options are also respected when dropping files on a window.

The quickstart feature is currently disabled by default and can be
enabled by setting the user default MMPreloadCacheSize to a positive
integer.  With it enabled, new windows open more or less
instantaneously.
2008-08-01 21:31:03 +02:00
vimboss c295e3d8d1 updated for version 7.2b-026 2008-07-31 20:29:28 +00:00
vimboss b1b0936737 updated for version 7.2b-025 2008-07-31 20:04:27 +00:00
Jjgod Jiang e43b739944 A few MMAtsuiTextView rendering fixes
1. Fix AtsuiTextView italic angle problem.
2. Add underline/undercurl support for text drawing.
3. Use default background color to fill the inset area.
2008-07-29 21:42:45 +02:00
vimboss ea3d1b4ba6 updated for version 7.2b-024 2008-07-29 10:22:12 +00:00
vimboss 8c3618271b updated for version 7.2b-023 2008-07-27 13:57:29 +00:00
Bjorn Winckler 37e3e82f7c Ensure valid scroll region when deleting/inserting rows 2008-07-26 20:06:52 +02:00
vimboss 71ced625f5 updated for version 7.2b-022 2008-07-26 14:05:07 +00:00
vimboss fa46cfe5e7 updated for version 7.2b-021 2008-07-24 20:09:16 +00:00
vimboss 63cd7ab513 updated for version 7.2b-020 2008-07-24 19:31:11 +00:00
vimboss 93b5422bc6 updated for version 7.2b-019 2008-07-24 18:51:11 +00:00
vimboss a4a6146f2d updated for version 7.2b-018 2008-07-24 18:29:37 +00:00
vimboss 0b28a1550d updated for version 7.2b-017 2008-07-24 17:34:23 +00:00
vimboss d5bd3e3888 updated for version 7.2b-016 2008-07-24 16:45:38 +00:00
vimboss b1bc820ac9 updated for version 7.2b-015 2008-07-24 15:20:50 +00:00
vimboss c7333a644b updated for version 7.2b-014 2008-07-24 14:24:48 +00:00
vimboss a8cb1c5563 updated for version 7.2b-012 2008-07-24 11:51:40 +00:00
vimboss 752dcda77e updated for version 7.2b-011 2008-07-24 11:21:31 +00:00
vimboss b86aff8f47 updated for version 7.2b-010 2008-07-22 16:58:47 +00:00
vimboss 41a8a4d368 updated for version 7.2b-009 2008-07-18 15:14:43 +00:00
vimboss 25c670073a updated for version 7.2b-008 2008-07-18 10:54:50 +00:00
vimboss 6743003ba5 updated for version 7.2b-007 2008-07-18 10:05:58 +00:00
vimboss 61c7c7dd1b updated for version 7.2b-006 2008-07-18 09:26:30 +00:00
vimboss 76e0da8cce updated for version 7.2b-005 2008-07-16 20:43:37 +00:00
Jjgod Jiang 8c8db3cd4c Turn off ligatures by default
Turn off all common ligatures (fi, ffi) and rare ligatures (ct, ss).
2008-07-16 16:27:59 +08:00
Bjorn Winckler f96c9a6845 Update doc and short version string for Vim 7.2b 2008-07-16 16:16:23 +02:00
vimboss 998efd292e updated for version 7.2b-004 2008-07-14 21:05:15 +00:00
vimboss 093e2f20f2 updated for version 7.2b-003 2008-07-14 19:48:05 +00:00
vimboss 86c54f9853 updated for version 7.2b-002 2008-07-14 17:51:11 +00:00
vimboss d693919cdd updated for version 7.2b-001 2008-07-14 09:52:40 +00:00
vimboss 7a75fec5ca updated for version 7.2b-000 2008-07-13 17:41:49 +00:00
Bjorn Winckler e9f5ced05c Fix typo in selector name for delayed dialog 2008-07-11 16:10:06 +02:00
Nicolas Weber e5e3c0d2c1 Fix memory leaks in PSMTabBarControl 2008-07-08 20:18:40 +02:00
Matt Tolton 1e2467b3f3 Add versioning to the plugin architecture
The plugin architecture version can be retrieved by a plugin from the
app mediator by calling the majorVersion and minorVersion methods.
2008-07-08 19:59:59 +02:00
Matt Tolton 754d698c33 Add menu item to toggle the plugin view drawer
The setting is remembered, so if the drawer was last toggled closed then
it should not open again until toggled.
2008-07-08 19:58:56 +02:00
vimboss 73626b6c6c updated for version 7.2a-019 2008-07-08 15:15:08 +00:00
vimboss ec20f00066 updated for version 7.2a-018 2008-07-08 10:46:08 +00:00
vimboss 4d14ca32db updated for version 7.2a-017 2008-07-08 09:36:58 +00:00
vimboss 3f3214a409 updated for version 7.2a-016 2008-07-07 19:23:37 +00:00
vimboss 82a81c93f1 updated for version 7.2a-015 2008-07-06 17:16:02 +00:00
Bjorn Winckler 3245d2c6e4 Snapshot 33 2008-07-05 20:33:57 +02:00
Bjorn Winckler 3af179bc83 Send print jobs to Preview.app
There are two drawbacks to this method:
1. the temporary file generated by :hardcopy is not deleted
2. Preview shows a "save changes?" sheet upon closing
2008-07-05 17:41:43 +02:00
Bjorn Winckler a3963603ed Update credits 2008-07-05 16:23:14 +02:00
Bjorn Winckler abfce2ceb7 Merge upstream
Conflicts:
	runtime/doc/eval.txt
	runtime/doc/os_mac.txt
	runtime/doc/various.txt
	runtime/syntax/vim.vim
2008-07-05 12:00:00 +02:00
vimboss dedeca9e4b updated for version 7.2a-014 2008-07-04 16:51:55 +00:00
vimboss 69a421f7a9 updated for version 7.2a-013 2008-07-04 09:44:11 +00:00
Kaoru Yoshida 01367854ac Draw marked text at pre-edit position 2008-07-04 09:43:55 +09:00
Kaoru Yoshida 3f99a2ce60 Fix marked text disappearing issues 2008-07-04 09:41:28 +09:00
Kaoru Yoshida 83c4f299d4 Fix display issue with marked text at the edge of a window 2008-07-02 21:59:37 +02:00
vimboss cb5a3504ee updated for version 7.2a-012 2008-07-02 19:05:48 +00:00
vimboss 7332de00a2 updated for version 7.2a-011 2008-07-01 19:56:57 +00:00
Bjorn Winckler 26335ef7bd Cmd-=/- work again
A category on NSNumber which is essential for Cmd-=/- got lost in the
creation of Miscellaneous.h, so revive this category.
2008-07-01 20:15:49 +02:00
Bjorn Winckler 76a3a22210 Marked text baseline adjusts for 'linespace' and font baseline 2008-07-01 20:11:00 +02:00
Kaoru Yoshida 33c4a57e05 Inline IM Patch 2008-07-01 19:19:19 +02:00
Bjorn Winckler b24d62ac03 Update help for 7.2a 2008-07-01 18:51:52 +02:00
Matt Tolton 523982bd0f Basic plugin architecture
Supports automatic loading of plugins.  Plugins can: add "GUI panels"
(which appear in a drawer for now), add global menu items, execute
arbitrary Vim script inside its associated Vim instance.

Also add routines to evaluate expressions in Vim and automatically
convert returned value to a Cocoa object.
2008-07-01 00:08:59 +02:00
Bjorn Winckler d363012f00 Add support for a global "Plug-In" menu 2008-06-30 23:51:37 +02:00
vimboss 2c3d9cf5f4 updated for version 7.2a-010 2008-06-29 14:16:06 +00:00
vimboss 7ccbd55772 updated for version 7.2a-009 2008-06-29 12:00:49 +00:00
Bjorn Winckler 63324d8fb8 Update credits 2008-06-28 18:09:14 +02:00
Bjorn Winckler 68e5dc4041 Only show proxy icon if file being edited exists 2008-06-28 18:07:47 +02:00
Bjorn Winckler 6af7bf3d9d Dialogs are always displayed in the default run loop mode 2008-06-28 18:00:23 +02:00
vimboss 957dd2b789 updated for version 7.2a-008 2008-06-28 14:10:11 +00:00
vimboss 7f1ec4af38 updated for version 7.2a-007 2008-06-28 13:09:56 +00:00
vimboss 6274fc0a91 updated for version 7.2a-006 2008-06-28 11:03:50 +00:00
vimboss a6273ea452 updated for version 7.2a-005 2008-06-27 19:17:34 +00:00
vimboss 1b66758764 updated for version 7.2a-004 2008-06-27 18:58:11 +00:00
vimboss 0b417afefb updated for version 7.2a-003 2008-06-27 18:42:32 +00:00
vimboss 3e03911680 updated for version 7.2a-002 2008-06-27 18:26:11 +00:00
vimboss 151ecabf8d updated for version 7.2a-001 2008-06-26 20:14:00 +00:00
Bjorn Winckler 3abdb9cb77 Cmd-? brings up "Help" menu on Leopard (shows help on Tiger) 2008-06-26 20:01:28 +02:00
Bjorn Winckler ad5cf22a75 Add file for misc code in frontend
The files Miscellaneous.[m|h] should be used for code common to the
frontend only (code shared with backend belongs in MacVim.[h|m]).  Some
code has been moved from MacVim.[h|m] and some from other frontend
source files.

Some code from the previous commit has also been restructured.
2008-06-26 19:27:48 +02:00
vimboss a74b78844d updated for version 7.2a-00 2008-06-25 20:13:35 +00:00
vimboss 527eb86b22 updated for version 7.2a 2008-06-25 01:35:16 +00:00
vimboss 473f6440a5 updated for version 7.2a 2008-06-25 01:26:17 +00:00
vimboss 0688d62523 updated for version 7.2a 2008-06-25 01:18:32 +00:00
vimboss 4f10f1c121 updated for version 7.2a 2008-06-25 01:14:13 +00:00
vimboss fd92d907e2 updated for version 7.2a 2008-06-25 01:05:34 +00:00
vimboss ddd0692356 updated for version 7.2a 2008-06-25 01:02:34 +00:00
vimboss 075a66afb3 updated for version 7.2a 2008-06-25 01:00:37 +00:00
vimboss c08d59f6fb updated for version 7.2a 2008-06-25 00:55:20 +00:00
vimboss b97664e078 updated for version 7.2a 2008-06-25 00:50:38 +00:00
vimboss 34a3bc02df updated for version 7.2a 2008-06-25 00:48:31 +00:00
vimboss e2884876f2 updated for version 7.2a 2008-06-25 00:44:59 +00:00
vimboss 721ab2c4ee updated for version 7.2a 2008-06-25 00:42:29 +00:00
vimboss 0c515cb6e8 updated for version 7.2a 2008-06-25 00:39:49 +00:00
vimboss 925a408c9b updated for version 7.2a 2008-06-25 00:34:34 +00:00
vimboss d51da8ae26 updated for version 7.2a 2008-06-25 00:33:13 +00:00
vimboss 5f8d5b9506 updated for version 7.2a 2008-06-25 00:31:04 +00:00
vimboss 8aac2cfa00 updated for version 7.2a 2008-06-25 00:29:54 +00:00
vimboss 42a20b424e updated for version 7.2a 2008-06-25 00:26:19 +00:00
vimboss b9fa86db77 updated for version 7.2a 2008-06-25 00:23:56 +00:00
vimboss f4c4042cc7 updated for version 7.2a 2008-06-25 00:22:05 +00:00
vimboss 9910f9a404 updated for version 7.2a 2008-06-25 00:16:10 +00:00
vimboss 7d20ae0e9f updated for version 7.2a 2008-06-25 00:09:14 +00:00
vimboss da0253b0b8 updated for version 7.2a 2008-06-24 23:58:50 +00:00
vimboss 97186bab3b updated for version 7.2a 2008-06-24 22:58:06 +00:00
vimboss 0554c4af6b updated for version 7.2a 2008-06-24 22:14:38 +00:00
vimboss 8f5a3aeb21 updated for version 7.2a 2008-06-24 22:09:24 +00:00
vimboss efe58cdf91 updated for version 7.2a 2008-06-24 21:56:24 +00:00
vimboss 490fa97722 updated for version 7.2a 2008-06-24 21:16:56 +00:00
vimboss d87f8c5f49 updated for version 7.2a 2008-06-24 20:39:31 +00:00
vimboss 2d9f2539e6 updated for version 7.2a 2008-06-24 20:19:36 +00:00
Nico Weber b391feee88 Add "show hidden files" checkbox to open file dialog 2008-06-24 21:32:31 +02:00
Bjorn Winckler 79ec8a039d Fix typo in Appcast for snapshot 32 2008-06-25 00:01:12 +02:00
Bjorn Winckler da4c936c72 Tell Git to ignore files 2008-06-24 20:53:57 +02:00
Bjorn Winckler 57247ff882 Don't respond to SetWindowTitleMsgID message in live resize
Responding to these messages would clobber the text dimension title that
is set during live resize.
2008-06-24 20:52:01 +02:00
Kyle Lippincott 53f258bb6f Add proxy icon support 2008-06-24 20:28:40 +02:00
Bjorn Winckler 10cff2591d Update README file 2008-06-22 17:08:38 +02:00
Bjorn Winckler ab9df03d0d Snapshot 32 2008-06-22 14:30:09 +02:00
Bjorn Winckler e7b9c11089 Delay display of popup menu
The popup menu enters a modal loop so it is not displayed immediately to
avoid blocking inside processCommandQueue:.
2008-06-21 21:23:30 +02:00
Bjorn Winckler d98996d31c Code cleanup 2008-06-21 21:18:17 +02:00
Bjorn Winckler 40056b05c3 Delay processing unsafe command queue items
Unsafe messages are defined in isUnsafeMessage().  If a message is
unsafe it should only be handled in the default run loop mode.  This is
e.g. to avoid deleting Cocoa objects when a Cocoa message may be busy
processing it (which may happen due to the nature of distributed objects
and the fact that we process DO message in 'event tracking' mode).
2008-06-21 20:32:37 +02:00
Bjorn Winckler a4e3a7370b Search for toolbar icons in 'runtimepath' 2008-06-21 18:14:36 +02:00
Bjorn Winckler 7ad0084f3f Merge upstream 2008-06-21 16:31:00 +02:00
vimboss d165ccb4bc updated for version 7.1-330 2008-06-21 14:30:28 +00:00
vimboss b53ee76b5e updated for version 7.1-329 2008-06-21 12:14:30 +00:00
vimboss 6255f52fc5 updated for version 7.1-328 2008-06-21 11:12:49 +00:00
vimboss f63e3834b4 updated for version 7.1-327 2008-06-20 19:29:35 +00:00
Bjorn Winckler 9338c9c55c Fall back on latin-1 if Vim strings are not valid utf-8 2008-06-20 19:50:22 +02:00
Bjorn Winckler 11a1c2cb92 Never delete toolbar 2008-06-20 19:36:34 +02:00
Bjorn Winckler 59ad683558 Ensure vim controllers are released in default run loop mode
Vim controllers are released when NSConnectionDidDieNotification is
received.  This notification can arrive in pretty much any run loop mode
so we take care not to act on it until the run loop mode is back to
default.  Otherwise we run the risk of releasing objects which Cocoa is
currently using (e.g. view items) and this leads to crashes.
2008-06-20 19:33:34 +02:00
vimboss 95fb95ebcc updated for version 7.1-326 2008-06-20 16:51:41 +00:00
vimboss bc9688ffdc updated for version 7.1-325 2008-06-20 16:31:07 +00:00
vimboss bafdc2c3e1 updated for version 7.1-324 2008-06-20 16:07:02 +00:00
vimboss 279b3f843c updated for version 7.1-323 2008-06-20 15:53:31 +00:00
vimboss 603f746178 updated for version 7.1-322 2008-06-20 15:31:51 +00:00
vimboss 255571d05e updated for version 7.1-321 2008-06-20 14:52:32 +00:00
vimboss 82038bc905 updated for version 7.1-320 2008-06-20 14:32:41 +00:00
vimboss bca5b2086e updated for version 7.1-319 2008-06-20 10:56:16 +00:00
vimboss 67d03b985b updated for version 7.1-318 2008-06-20 09:59:25 +00:00
vimboss 2d36c33fd5 updated for version 7.1-317 2008-06-20 09:40:11 +00:00
vimboss ee9959e56c updated for version 7.1-316 2008-06-20 09:11:34 +00:00
Bjorn Winckler 9ca5f6bcdb Guard against reentrant calls to processCommandQueue:
If processCommandQueue: is called when inProcessCommandQueue is set we
add the input to a receive queue and return.  This is to ensure that
processCommandQueue: can only be called "once at a time".  Reentrant
calls can be caused by calling a synchronous DO message or by entering a
modal loop in the frontend.
2008-06-15 16:11:38 +02:00
vimboss 626995c3e8 updated for version 7.1-315 2008-06-15 12:21:50 +00:00
Bjorn Winckler 634ef3b803 Never translate Ctrl-click if Alt, Shift, or Cmd are pressed 2008-06-13 19:27:56 +02:00
Bjorn Winckler aed4648a3d Make background processes work 2008-06-13 19:12:55 +02:00
Bjorn Winckler cd2f7e9eb1 Flush output queue even when 'exiting' flag is set
There are legitimate instances when the queue should flush even though
Vim is exiting, e.g. to display a 'confirm quit' dialog with 'go+=c'.

This patch has the negative side-effect that the "dropping DO message"
warning may occur more frequently.  Another fix for this problem has to
be devised.
2008-06-13 19:01:56 +02:00
Bjorn Winckler 3b966f9e01 Snapshot 31 2008-06-13 16:35:31 +02:00
Bjorn Winckler 8009a9912d Update DejaVu font to version 2.25 2008-06-13 14:27:02 +02:00
Bjorn Winckler cdf043f0f9 Draw modeless selection 2008-06-12 22:22:16 +02:00
Bjorn Winckler 757e8b4359 Toolbar buttons respond to mouse clicks again
Toolbar items send vimToolbarItemAction: instead of vimMenuItemAction:.
This enables us to separate toolbar items from menu items and can build
proper descriptors (starting with "ToolBar").
2008-06-12 13:23:26 +02:00
Bjorn Winckler 7b68b0b56d Disable default main menu key equivalent hack
In performKeyEquivalent: do not pass the key equivalent to
defaultMainMenu since this breaks the menus on OS X 10.4.  Also, this
hack is not strictly needed now that window cycling is hardcoded (and a
"New Window" menu is always available on the dock menu) so it is just as
well that it is removed.
2008-06-12 12:58:52 +02:00
Bjorn Winckler 21b029712f Set mouse cursor on mouseMoved:
This seems to be the only way to get the mouse cursor not to be changed
to an I-beam cursor all the time.
2008-06-09 22:18:36 +02:00
Bjorn Winckler 80b4c97a2c Add Dock menu 2008-06-09 21:52:32 +02:00
Bjorn Winckler 404077032e Dialog box handling updated
Keep waiting for dialog reply until it is received.  Any input received
during this wait is discarded unless it is a 'set text dimensions'
message (or keyboard/mouse input).  Also, make setDialogReturn: a
synchronous call so that it is less likely to get dropped.
2008-06-09 21:34:54 +02:00
Bjorn Winckler 04cd1420c1 Force flush output queue before presenting any dialog
The previous commit did not ensure the output queue was flushed before
"browse" dialogs were shown.
2008-06-09 19:13:43 +02:00
Bjorn Winckler 46ae2ec9cb Force flush output queue before showing dialog
This ensures that the swap file information is displayed when the 'swap
file exists' dialog is shown.
2008-06-09 18:48:10 +02:00
Bjorn Winckler 85cc2265e8 Merge upstream 2008-06-09 17:08:00 +02:00
vimboss 4c3907a8ff updated for version 7.1-314 2008-06-09 15:07:54 +00:00
vimboss f4fef46de2 updated for version 7.1-313 2008-06-09 13:10:45 +00:00
vimboss 28c76af675 updated for version 7.1-312 2008-06-09 12:46:00 +00:00
Bjorn Winckler 9716d0b66f Snapshot 30 2008-06-08 16:54:26 +02:00
Bjorn Winckler 428d1b4412 Window cycling hardcoded to keycode 50
Window cycling is hardcoded to happen when the Cmd key is pressed with
the key whose keycode = 50.  Having window cycling in the "Window" menu
means that window cycling stops working when the keyboard layout is
changed.  Thus revert back to the old way of dealing with this since it
seems to work better.
2008-06-08 16:35:43 +02:00
Bjorn Winckler bf70f82498 Snapshot 29 2008-06-08 14:21:16 +02:00
Bjorn Winckler 89d9e60b8a Add 'rightleft' support to ATSUI renderer 2008-06-07 15:36:07 +02:00
Bjorn Winckler 0ea7546c7c Add 'mousehide' option support 2008-06-07 15:35:25 +02:00
Bjorn Winckler 321fdf61aa Ensure processCommandQueueDidFinish: gets called if exception is raised 2008-06-07 14:33:05 +02:00
Bjorn Winckler 2fa74c01aa Use -[NSScreen visibleFrame] to get full-screen max dimensions
This fixes a bug where the window dimensions were not restored after
leaving full-screen (with 'maxvert' fu-option set).
2008-06-07 14:30:52 +02:00
Bjorn Winckler c4222c6ebb Don't delay loading "Buffers" menu
This avoids a flickering menu each time a new editor window is opened.
2008-06-07 12:42:47 +02:00
Bjorn Winckler 1f538dc364 Set title for separator items to ensure valid descriptors 2008-06-06 23:32:26 +02:00
Bjorn Winckler 9471224d0b Give Vim processes some time to terminate before MacVim does
This should stop MacVim from beeping when Cmd-q is pressed.
2008-06-06 22:46:13 +02:00
Bjorn Winckler 1d83527039 Pass 'rl' option in "DrawCursor" message 2008-06-06 22:31:21 +02:00
Bjorn Winckler 7752431b82 Ensure "Services" menu is empty when creating new main menu
MMVimController uses a copy of the "MacVim" menu that is defined inside
MainMenu.nib instead of getting it from the default main menu.  This
ensures that the "Services" menu is initially empty for each new
MMVimController.  Without this the setKeyEquivalent: call would fail if
the key equivalent already was in a "Services" menu item (e.g. <D-F> and
<D-L> would fail).
2008-06-06 21:20:55 +02:00
Bjorn Winckler 2ac28f887e Edit->Font->Bigger/Smaller validates properly
Fixes bug where the above items were enabled even when all windows were
minimized.
2008-06-06 17:47:54 +02:00
Bjorn Winckler 9c517cb4e9 Don't draw control chars in MMTextStorage
It can happen that MMTextStorage is asked to draw characters from the
"Control Characters" set (e.g. when :shell is invoked).  This would
cause internal errors in MMTextStorage so when control chars are
detected, simply draw blanks instead.
2008-06-06 14:24:49 +02:00
Bjorn Winckler 3915c6afc6 Catch exceptions in processCommandQueue: 2008-06-06 14:22:49 +02:00
Bjorn Winckler a4569d06ac Do not set key equivalent when 'mac_key == 0' 2008-06-06 14:16:10 +02:00
Bjorn Winckler cb120a21cf Validate performClose: in MMWindow and MMFullscreenWindow
Failing to validate would cause the "Close" menu item to be disabled in
full-screen.
2008-06-05 23:13:40 +02:00
Bjorn Winckler 7070fd3f76 Update help on menus 2008-06-05 21:27:02 +02:00
Bjorn Winckler 9f1b770ee6 Add "Cycle Through Windows" to default "Windows" menu
This ensures that Cmd-` works for all windows.  Also changed its
alternate to read "Cycle Backwards Through Windows".  Note that the
default "Windows" menu does not contain the alternate since Interface
Builder turned Cmd-Shift-` into Cmd-~ which is no longer a valid
alternate.
2008-06-05 20:52:30 +02:00
Bjorn Winckler ebf10927c7 Ignore "Recent Files" when no "File" menu is found 2008-06-05 20:24:36 +02:00
Bjorn Winckler e18186c461 Pass key equivalents to default main menu after main menu
This is so that the key equivalents set up in the default main menu will
work even when the system gvimrc files hasn't been sourced.  This is
useful e.g. when "-u NONE -U NONE" is passed as arguments resulting in
the default Vim menus being used.
2008-06-05 20:19:32 +02:00
Bjorn Winckler af279d2477 Update MMAppController top level information 2008-06-04 21:53:05 +02:00
Bjorn Winckler 8c442b7b28 Merge upstream 2008-06-04 21:36:00 +02:00
vimboss 4c6ed9759c updated for version 7.1-311 2008-06-04 19:35:35 +00:00
Bjorn Winckler d98e291038 Set windows menu even if it is nil 2008-06-04 21:21:28 +02:00
Bjorn Winckler 092e0cc894 Add support for popup menus 2008-06-04 21:17:05 +02:00
vimboss b904b019b8 updated for version 7.1-310 2008-06-04 17:37:34 +00:00
Bjorn Winckler c0159b8fdf Default menu "MacVim Help" item opens help window maximized 2008-06-04 19:08:52 +02:00
Bjorn Winckler 11ec93a03a Add "Minimize All" and "Zoom All" items to "Windows" menu 2008-06-04 19:03:33 +02:00
Bjorn Winckler c2f8b396de Add "Cycle Through Windows" to Windows menu (remove <D-`> hack) 2008-06-04 18:45:45 +02:00
Bjorn Winckler fa15736b2b Hook up "MacVim Help" on default main menu 2008-06-04 18:25:08 +02:00
Bjorn Winckler d1a9e08f94 Add standard menus to default main menu 2008-06-04 18:17:23 +02:00
vimboss 9d2727c56f updated for version 7.1-309 2008-06-04 13:28:18 +00:00
vimboss ce9c112020 updated for version 7.1-308 2008-06-04 12:29:14 +00:00
vimboss 0e2ddfca38 updated for version 7.1-307 2008-06-04 11:35:26 +00:00
vimboss 1f7de911ba updated for version 7.1-306 2008-06-04 09:00:32 +00:00
Bjorn Winckler f6ab5cbc03 Use default menu when no window open, fix 'Recent Files' menu 2008-06-03 23:15:18 +02:00
Bjorn Winckler 44d7e60b06 Change heuristic for finding "Services" menu 2008-06-02 18:44:59 +02:00
Bjorn Winckler 0e37f590ab Use -[NSApp setMainMenu:] to update main menu 2008-06-01 21:28:18 +02:00
Bjorn Winckler a0f684e003 Add autoenabling for menus 2008-06-01 15:57:21 +02:00
Bjorn Winckler f54c3100e9 Menu removal functionality added 2008-06-01 14:30:00 +02:00
Bjorn Winckler a588fc3e33 Use menu descriptors instead of tags to locate menu items 2008-05-31 21:47:30 +02:00
vimboss 039f611554 updated for version 7.1-305 2008-05-29 20:41:57 +00:00
vimboss 3a4682c9dd updated for version 7.1-304 2008-05-29 19:47:13 +00:00
Nico Weber fdc64858c5 Wrap user-visible strings in NSLocalizedString() 2008-05-29 17:01:44 +02:00
vimboss 45a9151fc6 updated for version 7.1-303 2008-05-29 13:36:10 +00:00
vimboss b9241163d8 updated for version 7.1-302 2008-05-28 20:02:48 +00:00
Bjorn Winckler defa7bd098 Insert mode cursor respects 'rightleft' option
When 'rl' is enabled the insert mode cursor is drawn on the right-hand
side of a cell.
2008-05-28 21:16:27 +02:00
vimboss 6bfab82aca updated for version 7.1-301 2008-05-28 17:02:46 +00:00
vimboss 64959e3177 updated for version 7.1-300 2008-05-28 15:32:20 +00:00
vimboss 2eee45eb39 updated for version 7.1-299 2008-05-28 14:49:58 +00:00
Nico Weber 8d051eef4e Make QuickLook work with .vim files 2008-05-27 17:40:55 +02:00
Bjorn Winckler 7f449520a5 Patch a memory leak
The 'vimState' instance variable in MMVimController is now released on
dealloc.
2008-05-25 21:59:39 +02:00
Bjorn Winckler 07831f45b2 Snapshot 28 2008-05-25 20:22:58 +02:00
Bjorn Winckler 9a69ad0d62 Open and save dialogs track the Vim pwd
Open and save dialogs will open up at the present working directory of
the key Vim process.  This can be disabled by setting the user default
"MMDialogsTrackPwd" to 0.  If disabled, these dialogs always open up at
the last location browsed to (which is the default OS X behaviour).
2008-05-25 19:22:12 +02:00
Bjorn Winckler be6ecb5d92 Set 'backspace' in the system vimrc
Add "indent,eol,start" to the 'backspace' option in $VIM/vimrc to make
the delete key behave in a more familiar way to new users.  The help
file has been update to point out this non-standard behaviour.
2008-05-25 13:35:08 +02:00
Bjorn Winckler 138be9d567 Improve "Edit" menu support in dialogs
The Edit menu items cut/copy/paste/select all/undo/redo are wired to
send the appropriate action messages (now possible with :macmenu
command) so that they may work with dialogs.  However, to make this work
100%, menus must first autoenable (which they currently do not).  This
will be addressed in a future patch.
2008-05-20 16:12:52 +02:00
Bjorn Winckler 0430474168 Coerce MacVim to work with LCC
The LCC (Logitech Control Center) comes with an input manager which
registers its own root object with the default NSConnection.  MacVim
uses the root object of the default connection to vend the frontend
object, so LCC would cause MacVim to never open any new windows.

To work around this problem the default connection is no longer used in
MacVim, instead a new connection is created and this connection is used
to vend the frontend object instead.
2008-05-20 14:40:57 +02:00
Bjorn Winckler 0f1ee64746 Fix bug in :macmenu
Menu item not found lead to bad memory access.
2008-05-19 21:34:55 +02:00
Bjorn Winckler d08cc220fd Add "File.Save All" menu item
This patch serves the secondary purpose of showing off the new feature
of being able to specify alternate menu items using the new :macmenu
command.  When the "File" menu is revealed either the "Save All" or the
"Save" item is displayed, depending on whether Alt is held or not.
2008-05-19 20:08:52 +02:00
Bjorn Winckler 04d9ab21b0 Bind "File.Close" to ":conf q"
With the introduction of ":macmenu" it is possible to bind "File.Close"
to ":conf q" and at the same time have it send the "performClose:"
action.

This patch reverts back to using ":conf q" since there were problems
with "File.Close" in conjunction with bindings to <C-\>.
2008-05-19 19:28:20 +02:00
Bjorn Winckler 9c7523e944 Change ":macmenukey" to ":macmenu"
The new command allows better control over menus with ability to specify
key equivalent, action, and wheter menu item is an alternate.  These are
specified as "key=value" pairs to allow future expansion.  The help
files have also been rewritten to reflect this change.
2008-05-19 19:09:05 +02:00
Bjorn Winckler 030d0d07ec Update help which referred to Carbon version
In particular, state that MacVim does not source $VIMRUNTIME/macmap.vim.
2008-05-19 17:40:02 +02:00
Bjorn Winckler 0578f14843 Appcast points to fixed snapshot 27 2008-05-13 19:38:58 +02:00
Bjorn Winckler 11274e43c4 Merge upstream 2008-05-12 18:00:00 +02:00
Bjorn Winckler ebfad47ec6 Snapshot 27
The 'make-snapshot.sh' script has been updated to run on Leopard with
Perl support (TCL support is disabled for now).
2008-05-11 17:54:22 +02:00
Bjorn Winckler 48e6f325d6 Update credits 2008-05-11 16:22:01 +02:00
vimboss e899e2dfc7 updated for version 7.1-298 2008-05-10 19:39:08 +00:00
Bjorn Winckler 1bc466c774 Move "Recent Files" menu 2008-05-10 16:11:43 +02:00
Bjorn Winckler f08c899208 Add files opened/saved from :browse to "Recent Files" menu 2008-05-10 16:07:58 +02:00
Bjorn Winckler 31bd050607 Avoid "dropping DO message ..." warning when quitting
The warning was a result of sending a DO message from Vim and then
immediately exiting the process.  It is avoided by not sending any DO
messages while Vim is exiting.
2008-05-10 15:25:44 +02:00
Bjorn Winckler 2e6fb2ea53 Enable macvim color scheme to work with other Vim ports 2008-05-09 21:58:19 +02:00
Nico Weber 862da53932 Add "Recent Files" menu
The recent files menu will only remember files opened from Finder and
not files opened from within Vim (via :e etc.).  Recent files will also
be added to the "Recent Items" menu under the Apple menu.

(Patch by Nico Weber with some modifications by Bjorn Winckler.)
2008-05-09 21:41:39 +02:00
Bjorn Winckler 15763286bd Window no longer moves down on zoom 2008-05-09 15:05:31 +02:00
Bjorn Winckler fed823a238 Modifying 'antialias' in .[g]vimrc now works 2008-05-09 13:36:15 +02:00
Bjorn Winckler 5d5176aabf Cmd-w shows confirmation dialog when buffer modified 2008-05-09 13:27:03 +02:00
Enno Lübbers 19468d3117 Add background color option to 'fuopt' 2008-05-08 12:31:28 +02:00
Bjorn Winckler 0402b6b5c4 Merge upstream 2008-05-07 21:47:00 +02:00
vimboss b6932fb3ae updated for version 7.1-297 2008-05-07 19:46:51 +00:00
vimboss 22695b7f3b updated for version 7.1-296 2008-05-07 17:09:24 +00:00
vimboss bc8b62f3d9 updated for version 7.1-295 2008-05-07 15:40:33 +00:00
vimboss bd542602dd updated for version 7.1-294 2008-05-07 11:10:28 +00:00
Bjorn Winckler e5159c3b6a Snapshot 26 2008-04-11 22:54:48 +02:00
Bjorn Winckler b36829bcaa Add 'antialias' to list of non-standard options in help 2008-04-10 21:07:52 +02:00
Bjorn Winckler 07c344444b New MacVim icon 2008-04-10 20:57:46 +02:00
Bjorn Winckler bafcc3365d Merge upstream 2008-04-09 15:50:00 +02:00
vimboss 41ca0e5508 updated for version 7.1-293 2008-04-09 13:49:57 +00:00
vimboss 246dfc17f4 updated for version 7.1-292 2008-04-09 10:16:02 +00:00
Bjorn Winckler 9aae3ba3cc Fix initial window placement bug
The algorithm which determines the topmost window only searches through
visible windows.  The initial window placement bug was a result of this
algorithm returning the (invisible) window whose position was to be
determined.
2008-04-08 13:37:21 +02:00
Bjorn Winckler 0a54dd7370 Snapshot 25 2008-04-06 19:38:05 +02:00
Bjorn Winckler 6e8e20588d Only cascade from windows belonging to Vim process
This ensures that a newly opened window isn't cascaded from e.g. the
preferences panel.
2008-04-06 14:36:12 +02:00
Bjorn Winckler 296634f40e Make copy/paste respect block-wise selections
When text is copied inside Vim we put both the text and the motion type
on the pasteboard.  Text copied from outside Vim never contains the
motion type so we have to guess between line and character-wise motion
types in that case.
2008-04-05 15:24:25 +02:00
Bjorn Winckler 13d45e4ff9 Merge upstream
Conflicts:
	src/vim.h
2008-04-01 20:00:00 +01:00
vimboss 3e314dee6e updated for version 7.1-291 2008-04-01 18:59:07 +00:00
vimboss 779811f241 updated for version 7.1-290 2008-04-01 15:14:36 +00:00
vimboss 22017e1410 updated for version 7.1-289 2008-04-01 12:53:43 +00:00
vimboss af8ea2cc11 updated for version 7.1-288 2008-04-01 12:31:14 +00:00
vimboss ac3b778ddb updated for version 7.1-287 2008-04-01 11:12:09 +00:00
vimboss 1de2bc973a updated for version 7.1-286 2008-04-01 10:06:39 +00:00
Bjorn Winckler cdb8dc17ca Update :maca help, release actionDict 2008-03-26 20:41:00 +01:00
Bjorn Winckler b11e6ca3c9 Fix typo in help on :maca 2008-03-23 19:05:37 +01:00
Nico Weber 69c366f7ed Add command line completion to :macaction command
This enables the user to cycle through all actions by typing
":maca <Tab>" and then repeatedly hitting <Tab>.  The help on :maca was
also updated.

(Initial patch by Nico Weber with some changes by Bjorn Winckler.)
2008-03-23 18:48:24 +01:00
Nico Weber 7792c4e8ab Transparency setting not lost after leaving full-screen
Fixes bug where setting 'transp' while in full-screen and switching back
to windowed mode would result in the window being opaque.
2008-03-22 17:15:46 +01:00
Bjorn Winckler 3910f20697 Disable <D-?> key equivalent
The key equivalent is disabled for now since it only works on Tiger and
not on Leopard.
2008-03-22 14:19:23 +01:00
Bjorn Winckler 472eda54f6 Update Help menu
Add "MacVim Help" item with <D-?> key equivalent, as well as a
"MacVim Website" item which opens up the MacVim website in the user's
default browser.
2008-03-21 20:30:41 +01:00
vimboss c09ef35588 updated for version 7.1-285 2008-03-20 13:39:37 +00:00
vimboss bf90097520 updated for version 7.1-284 2008-03-20 12:23:49 +00:00
Bjorn Winckler 3292e01a82 Improve <D-w> behaviour
With this patch <D-w> works as follows:
- if in Ex-mode, exit by sending "^U:vi<CR>"
- if the command-line window is open, close it using CTRL-\_CTRL-N
- otherwise go to normal mode and add ":q<CR>" to the input buffer
2008-03-19 19:56:19 +01:00
Nico Weber ba210fdada Add full-screen options
When entering full-screen the 'fuoptions' option is used to determine
whether the vim view should maximize in the vertical and/or horizontal
directions.  The previous rows/columns are restored upon returning to
windowed mode.

The help docs for 'fullscreen' have been updated and docs for
'fuoptions' have been added.
2008-03-18 19:52:59 +01:00
Jjgod Jiang 2d57fac276 Support 'antialias' with default renderer
This provides some support for the 'antialias' option with the
NSTextView renderer.  However, some fonts seem to be unaffected by this
option.  In particular, Monaco of point sizes up to 10 always render
without antialiasing.
2008-03-16 21:53:35 +01:00
Jjgod Jiang 4868c3cb85 Support 'antialias' with ATSUI renderer
This commit adds support for the 'antialias' option with the ATSUI
renderer (the NSTextView renderer still uses System Preferences).  The
docs on 'antialias' have been updated.

Some changes to the code used by Carbon Vim is affected by this commit.
A feature flag FEAT_ANTIALIAS was added to support easy disabling of
'antialias' support.

(Patch by Jjgod Jiang with some modifications by Bjorn Winckler.)
2008-03-16 18:40:48 +01:00
vimboss d38abe1843 updated for version 7.1-283 2008-03-16 15:04:34 +00:00
vimboss 045cef0a51 updated for version 7.1-282 2008-03-16 13:54:13 +00:00
vimboss 560504f7ba updated for version 7.1-281 2008-03-16 12:09:58 +00:00
vimboss 4ba3129468 updated for version 7.1-280 2008-03-15 12:12:59 +00:00
vimboss 98cc0fee24 updated for version 7.1-279 2008-03-15 11:41:07 +00:00
Bjorn Winckler 26349fc938 Update credits 2008-03-15 12:03:32 +01:00
Bjorn Winckler fb5cf175af Snapshot 24 2008-03-14 21:38:36 +01:00
Bjorn Winckler 0243a624be All prefs panes have same width 2008-03-14 20:12:45 +01:00
Bjorn Winckler 96433d48a1 Update credits 2008-03-14 20:11:37 +01:00
Nico Weber e5ecb34260 Update layout of the Integration prefs pane 2008-03-14 19:44:34 +01:00
Bjorn Winckler 60fd59ea55 Remove build phase from "Edit in ODBEditor" project
The removed build phase was a "Run Script" which called a shell script
that effectively did nothing.
2008-03-14 19:25:24 +01:00
Nico Weber 8afb077865 Ensure mouse cursor is set (again)
The former patch did not work 100% and it also hogged CPU.  This patch
seems to work better and requires no extra CPU.
2008-03-14 19:12:52 +01:00
Bjorn Winckler eef4ba19a6 Take care of compiler warning in MMTextView 2008-03-13 21:45:12 +01:00
Scott 8574b2152c Fix ODB Input Manager memory issue
The Input Manager failed to retain two string objects which were
accessed after having been autoreleased.  This patch fixes the bug where
the "Edit in ..." menu entry was corrupted and related issues.

The version number of the Input Manager has been bumped to 1.2.
2008-03-13 21:41:38 +01:00
vimboss 52b5ee23fc updated for version 7.1-278 2008-03-12 20:48:13 +00:00
vimboss d97c301011 updated for version 7.1-277 2008-03-12 16:38:55 +00:00
vimboss 343bd24d2e updated for version 7.1-276 2008-03-12 16:27:00 +00:00
vimboss a58654a6b0 updated for version 7.1-275 2008-03-12 13:40:54 +00:00
vimboss af62299744 updated for version 7.1-274 2008-03-12 12:46:13 +00:00
vimboss 60cd2a75c1 updated for version 7.1-273 2008-03-12 12:17:28 +00:00
vimboss 2ef7f8c8a0 updated for version 7.1-272 2008-03-12 11:23:53 +00:00
vimboss f2282b0096 updated for version 7.1-271 2008-03-11 21:02:00 +00:00
Nico Weber 90c663f76b Ensure mouse cursor is set
There is a bug in NSTextView where it keeps resetting the mouse cursor
back to the I-beam cursor.  We "fix" this by setting the custom cursor
each time the mouse moves.
2008-03-11 21:46:53 +01:00
vimboss 5d748c8f27 updated for version 7.1-270 2008-03-10 20:34:59 +00:00
vimboss b884eef376 updated for version 7.1-269 2008-03-09 15:45:53 +00:00
vimboss 49cb3f99b8 updated for version 7.1-268 2008-03-09 13:30:56 +00:00
785 changed files with 133268 additions and 29138 deletions
+2
View File
@@ -1,6 +1,7 @@
.*.swp
.DS_Store
src/MacVim/MacVim.xcodeproj/*.mode1
src/MacVim/MacVim.xcodeproj/*.mode1v3
src/MacVim/MacVim.xcodeproj/*.pbxuser
src/MacVim/PSMTabBarControl/PSMTabBarControl.xcodeproj/*.mode1
src/MacVim/PSMTabBarControl/PSMTabBarControl.xcodeproj/*.pbxuser
@@ -21,3 +22,4 @@ src/objects
src/po/*.mo
src/tags
src/xxd/xxd
src/xxd/xxd.dSYM
+4 -4
View File
@@ -9,10 +9,10 @@ Vim Vi IMproved. A clone of the UNIX text editor Vi. Very useful
messages, shows current file name in window title, on-line
help, rectangular cut/paste, etc., etc., etc...
Version 7.1. Also runs under UNIX, MSDOS and other systems.
vim71rt.tgz contains the documentation and syntax files.
vim71bin.tgz contains the binaries.
vim71src.tgz contains the sources.
Version 7.2. Also runs under UNIX, MSDOS and other systems.
vim72rt.tgz contains the documentation and syntax files.
vim72bin.tgz contains the binaries.
vim72src.tgz contains the sources.
Author: Bram Moolenaar et al.
+6 -10
View File
@@ -137,6 +137,7 @@ SRC_UNIX = \
pixmaps/gen-inline-pixbufs.sh \
pixmaps/stock_icons.h \
src/INSTALL \
src/INSTALLx.txt \
src/Makefile \
src/auto/configure \
src/config.aap.in \
@@ -193,6 +194,7 @@ SRC_UNIX = \
src/vim_icon.xbm \
src/vim_mask.xbm \
src/vimtutor \
src/gvimtutor \
src/which.sh \
src/workshop.c \
src/workshop.h \
@@ -249,6 +251,7 @@ SRC_DOS = \
src/Make_w16.mak \
src/bigvim.bat \
src/msvcsetup.bat \
src/msvc2008.bat \
src/dimm.idl \
src/dlldata.c \
src/dosinst.c \
@@ -513,6 +516,7 @@ RT_SCRIPTS = \
runtime/indent/*.vim \
runtime/indent/README.txt \
runtime/ftplugin/*.vim \
runtime/ftplugin/logtalk.dict \
runtime/ftplugin/README.txt \
runtime/plugin/*.vim \
runtime/plugin/README.txt \
@@ -670,17 +674,9 @@ LANG_GEN = \
runtime/keymap/*.vim \
runtime/tutor/README.*.txt \
runtime/tutor/Makefile \
runtime/tutor/tutor.utf-8 \
runtime/tutor/tutor.?? \
runtime/tutor/tutor.cs.* \
runtime/tutor/tutor.gr.* \
runtime/tutor/tutor.hu.* \
runtime/tutor/tutor.ja.* \
runtime/tutor/tutor.ko.* \
runtime/tutor/tutor.pl.* \
runtime/tutor/tutor.ru.* \
runtime/tutor/tutor.sk.* \
runtime/tutor/tutor.tr.* \
runtime/tutor/tutor.zh.* \
runtime/tutor/tutor.??.* \
runtime/spell/README.txt \
runtime/spell/??/*.diff \
runtime/spell/??/main.aap \
+9 -6
View File
@@ -69,7 +69,7 @@ all install uninstall tools config configure reconfig proto depend lint tags typ
# Before creating an archive first delete all backup files, *.orig, etc.
MAJOR = 7
MINOR = 1
MINOR = 2
# Uncomment this line if the Win32s version is to be included.
DOSBIN_S = dosbin_s
@@ -87,8 +87,8 @@ DOSBIN_S = dosbin_s
# ignore warnings for missing include files, fix problems for syntax errors).
# - With these features: "make depend" (works best with gcc).
# - "make lint" and check the output (ignore GTK warnings).
# - Enable the efence library in "src/Makefile" and run "make test". May
# require disabling Python and Ruby to avoid trouble with threads.
# - Enable the efence library in "src/Makefile" and run "make test". Disable
# Python and Ruby to avoid trouble with threads (efence is not threadsafe).
# - Check for missing entries in runtime/makemenu.vim (with checkmenu script).
# - Check for missing options in runtime/optwin.vim et al. (with check.vim).
# - Do "make menu" to update the runtime/synmenu.vim file.
@@ -120,17 +120,20 @@ DOSBIN_S = dosbin_s
# - "bmake -f Make_bc3.mak BOR=E:\borlandc" (compiling xxd might fail, in that
# case set environment for compiling with Borland C++ 4.0 and do
# "make -f make_bc3.mak BOR=E:\BC4 xxd/xxd.exe").
# NOTE: this currently fails because Vim is too big.
# - "make test" and check the output.
# - Rename the executables to "vimd16.exe", "xxdd16.exe", "installd16.exe" and
# "uninstald16.exe".
# 32 bit DOS version:
# - Set environment for compiling with DJGPP; "gmake -f Make_djg.mak".
# - "rm testdir/*.out", "gmake -f Make_djg.mak test" and check the output.
# - "rm testdir/*.out", "gmake -f Make_djg.mak test" and check the output for
# "ALL DONE".
# - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and
# "uninstald32.exe".
# Win32 console version:
# - Set environment for Visual C++ Toolkit 2003: "msvcsetup.bat" (adjust the
# paths when necessary).
# - Set environment for Visual C++ 2008 Express Edition: "msvc2008.bat". Or,
# when using the Visual C++ Toolkit 2003: "msvcsetup.bat" (adjust the paths
# when necessary). For Windows 98 the 2003 version is required.
# - "nmake -f Make_mvc.mak"
# - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output.
# - Rename the executables to "vimw32.exe", "xxdw32.exe".
+4 -7
View File
@@ -1,4 +1,4 @@
README.txt for version 7.1 of Vim: Vi IMproved.
README.txt for version 7.2 of Vim: Vi IMproved.
WHAT IS VIM
@@ -133,9 +133,6 @@ MAIN AUTHOR
Send any other comments, patches, pizza and suggestions to:
Bram Moolenaar E-mail: Bram@vim.org
Molenstraat 2
2161 HP Lisse
The Netherlands
This is the address of my parents, they will forward mail and eat the pizza.
My actual address will change a couple of times in 2006.
Finsterruetihof 1
8134 Adliswil
Switzerland
+1 -1
View File
@@ -1,4 +1,4 @@
README_ami.txt for version 7.1 of Vim: Vi IMproved.
README_ami.txt for version 7.2 of Vim: Vi IMproved.
This file explains the installation of Vim on Amiga systems.
See README.txt for general information about Vim.
+1 -1
View File
@@ -1,4 +1,4 @@
README_amibin.txt for version 7.1 of Vim: Vi IMproved.
README_amibin.txt for version 7.2 of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_ami.txt" for installation instructions for the Amiga.
+1 -1
View File
@@ -1,4 +1,4 @@
README_amisrc.txt for version 7.1 of Vim: Vi IMproved.
README_amisrc.txt for version 7.2 of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_ami.txt" for installation instructions for the Amiga.
+10 -10
View File
@@ -1,19 +1,19 @@
README_bindos.txt for version 7.1 of Vim: Vi IMproved.
README_bindos.txt for version 7.2 of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows.
These files are in the runtime archive (vim70rt.zip).
These files are in the runtime archive (vim72rt.zip).
There are several binary distributions of Vim for the PC. You would normally
pick only one of them, but it's also possible to install several.
These ones are available (the version number may differ):
vim70d16.zip 16 bit DOS version
vim70d32.zip 32 bit DOS version
vim70w32.zip Windows 95/98/NT/etc. console version
gvim70.zip Windows 95/98/NT/etc. GUI version
gvim70ole.zip Windows 95/98/NT/etc. GUI version with OLE
gvim70_s.zip Windows 3.1 GUI version
vim72d16.zip 16 bit DOS version
vim72d32.zip 32 bit DOS version
vim72w32.zip Windows 95/98/NT/etc. console version
gvim72.zip Windows 95/98/NT/etc. GUI version
gvim72ole.zip Windows 95/98/NT/etc. GUI version with OLE
gvim72_s.zip Windows 3.1 GUI version
You MUST also get the runtime archive (vim70rt.zip).
The sources are also available (vim70src.zip).
You MUST also get the runtime archive (vim72rt.zip).
The sources are also available (vim72src.zip).
+16 -16
View File
@@ -1,4 +1,4 @@
README_dos.txt for version 7.1 of Vim: Vi IMproved.
README_dos.txt for version 7.2 of Vim: Vi IMproved.
This file explains the installation of Vim on MS-DOS and MS-Windows systems.
See "README.txt" for general information about Vim.
@@ -47,13 +47,13 @@ These are the normal steps to install Vim from the .zip archives:
Binary and runtime Vim archives are normally unpacked in the same location,
on top of each other.
2. Unpack the zip archives. This will create a new directory "vim\vim70",
2. Unpack the zip archives. This will create a new directory "vim\vim72",
in which all the distributed Vim files are placed. Since the directory
name includes the version number, it is unlikely that you overwrite
existing files.
Examples:
pkunzip -d gvim70.zip
unzip vim70w32.zip
pkunzip -d gvim72.zip
unzip vim72w32.zip
You need to unpack the runtime archive and at least one of the binary
archives. When using more than one binary version, be careful not to
@@ -69,7 +69,7 @@ These are the normal steps to install Vim from the .zip archives:
archive and follow the instructions in the documentation.
3. Change to the new directory:
cd vim\vim70
cd vim\vim72
Run the "install.exe" program. It will ask you a number of questions about
how you would like to have your Vim setup. Among these are:
- You can tell it to write a "_vimrc" file with your preferences in the
@@ -80,8 +80,8 @@ These are the normal steps to install Vim from the .zip archives:
console or in a shell. You can select one of the directories in your
$PATH. If you skip this, you can add Vim to the search path manually:
The simplest is to add a line to your autoexec.bat. Examples:
set path=%path%;C:\vim\vim70
set path=%path%;D:\editors\vim\vim70
set path=%path%;C:\vim\vim72
set path=%path%;D:\editors\vim\vim72
- Create entries for Vim on the desktop and in the Start menu.
That's it!
@@ -94,7 +94,7 @@ Remarks:
point to the top directory of your Vim files. Example:
set VIM=C:\editors\vim
Vim version 6.0 will look for your vimrc file in $VIM, and for the runtime
files in $VIM/vim70. See ":help $VIM" for more information.
files in $VIM/vim72. See ":help $VIM" for more information.
- To avoid confusion between distributed files of different versions and your
own modified vim scripts, it is recommended to use this directory layout:
@@ -105,14 +105,14 @@ Remarks:
C:\vim\vimfiles\ftplugin\*.vim Filetype plugins
C:\vim\... Other files you made.
Distributed files:
C:\vim\vim70\vim.exe The Vim version 6.0 executable.
C:\vim\vim70\doc\*.txt The version 6.0 documentation files.
C:\vim\vim70\bugreport.vim A Vim version 6.0 script.
C:\vim\vim70\... Other version 6.0 distributed files.
C:\vim\vim72\vim.exe The Vim version 6.0 executable.
C:\vim\vim72\doc\*.txt The version 6.0 documentation files.
C:\vim\vim72\bugreport.vim A Vim version 6.0 script.
C:\vim\vim72\... Other version 6.0 distributed files.
In this case the $VIM environment variable would be set like this:
set VIM=C:\vim
Then $VIMRUNTIME will automatically be set to "$VIM\vim70". Don't add
"vim70" to $VIM, that won't work.
Then $VIMRUNTIME will automatically be set to "$VIM\vim72". Don't add
"vim72" to $VIM, that won't work.
- You can put your Vim executable anywhere else. If the executable is not
with the other Vim files, you should set $VIM. The simplest is to add a line
@@ -136,8 +136,8 @@ Remarks:
Select Properties.
5. In the Program tab, change the "Cmdline" to add "/c" and the name of the
Vim executable. Examples:
C:\command.com /c C:\vim\vim70\vim.exe
C:\command.com /c D:\editors\vim\vim70\vim.exe
C:\command.com /c C:\vim\vim72\vim.exe
C:\command.com /c D:\editors\vim\vim72\vim.exe
6. Select the font, window size, etc. that you like. If this isn't
possible, select "Advanced" in the Program tab, and deselect "MS-DOS
mode".
+1 -1
View File
@@ -1,4 +1,4 @@
README_extra.txt for version 7.1 of Vim: Vi IMproved.
README_extra.txt for version 7.2 of Vim: Vi IMproved.
The extra archive of Vim is to be used in combination with the source archive
(vim-7.0-src.tar.gz). The extra archive is useless without it.
+1 -1
View File
@@ -1,4 +1,4 @@
README_lang.txt for version 7.1 of Vim: Vi IMproved.
README_lang.txt for version 7.2 of Vim: Vi IMproved.
This file contains files for non-English languages:
- Translated messages.
+1 -1
View File
@@ -1,4 +1,4 @@
README_mac.txt for version 7.1 of Vim: Vi IMproved.
README_mac.txt for version 7.2 of Vim: Vi IMproved.
This file explains the installation of Vim on Macintosh systems.
See "README.txt" for general information about Vim.
+1 -1
View File
@@ -1,4 +1,4 @@
README_ole.txt for version 7.1 of Vim: Vi IMproved.
README_ole.txt for version 7.2 of Vim: Vi IMproved.
This archive contains gvim.exe with OLE interface and VisVim.
This version of gvim.exe can also load a number of interface dynamically (you
+12 -12
View File
@@ -1,32 +1,32 @@
README_os2.txt for version 7.1 of Vim: Vi IMproved.
README_os2.txt for version 7.2 of Vim: Vi IMproved.
This file explains the installation of Vim on OS/2 systems.
See "README.txt" for general information about Vim.
NOTE: You will need two archives:
vim71rt.zip contains the runtime files (same as for the PC version)
vim71os2.zip contains the OS/2 executables
vim72rt.zip contains the runtime files (same as for the PC version)
vim72os2.zip contains the OS/2 executables
1. Go to the directory where you want to put the Vim files. Examples:
cd C:\
cd D:\editors
2. Unpack the zip archives. This will create a new directory "vim/vim71",
2. Unpack the zip archives. This will create a new directory "vim/vim72",
in which all the distributed Vim files are placed. Since the directory
name includes the version number, it is unlikely that you overwrite
existing files.
Examples:
pkunzip -d vim71os2.zip
unzip vim71os2.zip
pkunzip -d vim72os2.zip
unzip vim72os2.zip
After you unpacked the files, you can still move the whole directory tree
to another location.
3. Add the directory where vim.exe is to your path. The simplest is to add a
line to your autoexec.bat. Examples:
set path=%path%;C:\vim\vim71
set path=%path%;D:\editors\vim\vim71
set path=%path%;C:\vim\vim72
set path=%path%;D:\editors\vim\vim72
That's it!
@@ -41,10 +41,10 @@ Extra remarks:
C:\vim\_viminfo Dynamic info for 'viminfo'.
C:\vim\... Other files you made.
Distributed files:
C:\vim\vim71\vim.exe The Vim version 7.1 executable.
C:\vim\vim71\doc\*.txt The version 7.1 documentation files.
C:\vim\vim71\bugreport.vim A Vim version 7.1 script.
C:\vim\vim71\... Other version 7.1 distributed files.
C:\vim\vim72\vim.exe The Vim version 7.1 executable.
C:\vim\vim72\doc\*.txt The version 7.1 documentation files.
C:\vim\vim72\bugreport.vim A Vim version 7.1 script.
C:\vim\vim72\... Other version 7.1 distributed files.
In this case the $VIM environment variable would be set like this:
set VIM=C:\vim
+1 -1
View File
@@ -1,4 +1,4 @@
README_os_390.txt for version 7.1 of Vim: Vi IMproved.
README_os_390.txt for version 7.2 of Vim: Vi IMproved.
Welcome to the OS/390 Unix port of VIM.
+1 -1
View File
@@ -1,4 +1,4 @@
README_src.txt for version 7.1 of Vim: Vi IMproved.
README_src.txt for version 7.2 of Vim: Vi IMproved.
The source archive contains the files needed to compile Vim on Unix systems.
It is packed for Unix systems (NL line separator). It is also used for other
+2 -2
View File
@@ -1,8 +1,8 @@
README_srcdos.txt for version 7.1 of Vim: Vi IMproved.
README_srcdos.txt for version 7.2 of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows.
These files are in the runtime archive (vim70rt.zip).
These files are in the runtime archive (vim72rt.zip).
The DOS source archive contains the files needed to compile Vim on MS-DOS or
+1 -1
View File
@@ -1,4 +1,4 @@
README_unix.txt for version 7.1 of Vim: Vi IMproved.
README_unix.txt for version 7.2 of Vim: Vi IMproved.
This file explains the installation of Vim on Unix systems.
See "README.txt" for general information about Vim.
+1 -1
View File
@@ -1,4 +1,4 @@
README_vms.txt for version 7.1 of Vim: Vi IMproved.
README_vms.txt for version 7.2 of Vim: Vi IMproved.
This file explains the installation of Vim on VMS systems.
See "README.txt" in the runtime archive for information about Vim.
+1 -1
View File
@@ -1,4 +1,4 @@
README_w32s.txt for version 7.1 of Vim: Vi IMproved.
README_w32s.txt for version 7.2 of Vim: Vi IMproved.
This archive contains the gvim.exe that was specifically compiled for use in
the Win32s subsystem in MS-Windows 3.1 and 3.11.
+2 -2
View File
@@ -22,7 +22,7 @@
!define HAVE_NLS
!define VER_MAJOR 7
!define VER_MINOR 1
!define VER_MINOR 2
# ----------- No configurable settings below this line -----------
@@ -139,7 +139,7 @@ FunctionEnd
Function .onInstSuccess
WriteUninstaller vim${VER_MAJOR}${VER_MINOR}\uninstall-gui.exe
MessageBox MB_YESNO|MB_ICONQUESTION \
"The installation process has been successfull. Happy Vimming! \
"The installation process has been successful. Happy Vimming! \
$\n$\n Do you want to see the README file now?" IDNO NoReadme
Exec '$0\gvim.exe -R "$0\README.txt"'
NoReadme:
+63 -28
View File
@@ -2,13 +2,15 @@
" Description: Perform Ada specific completion & tagging.
" Language: Ada (2005)
" $Id$
" Maintainer: Martin Krischik
" Maintainer: Martin Krischik <krischik@users.sourceforge.net>
" Taylor Venable <taylor@metasyntax.net>
" Neil Bird <neil@fnxweb.com>
" Ned Okie <nokie@radford.edu>
" $Author$
" $Date$
" Version: 4.2
" Version: 4.6
" $Revision$
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $
" History: 24.05.2006 MK Unified Headers
" 26.05.2006 MK ' should not be in iskeyword.
" 16.07.2006 MK Ada-Mode as vim-ball
@@ -17,6 +19,10 @@
" 05.11.2006 MK Bram suggested not to use include protection for
" autoload
" 05.11.2006 MK Bram suggested to save on spaces
" 08.07.2007 TV fix mapleader problems.
" 09.05.2007 MK Session just won't work no matter how much
" tweaking is done
" 19.09.2007 NO still some mapleader problems
" Help Page: ft-ada-functions
"------------------------------------------------------------------------------
@@ -425,30 +431,49 @@ function ada#Create_Tags (option)
execute '!ctags --excmd=number ' . l:Filename
endfunction ada#Create_Tags
function ada#Switch_Session (New_Session) "{{{1
if a:New_Session != v:this_session
"
" We actualy got a new session - otherwise there
" is nothing to do.
"
if strlen (v:this_session) > 0
execute 'mksession! ' . v:this_session
" Section: ada#Switch_Session {{{1
"
function ada#Switch_Session (New_Session)
"
" you should not save to much date into the seession since they will
" be sourced
"
let l:sessionoptions=&sessionoptions
try
set sessionoptions=buffers,curdir,folds,globals,resize,slash,tabpages,tabpages,unix,winpos,winsize
if a:New_Session != v:this_session
"
" We actualy got a new session - otherwise there
" is nothing to do.
"
if strlen (v:this_session) > 0
execute 'mksession! ' . v:this_session
endif
let v:this_session = a:New_Session
"if filereadable (v:this_session)
"execute 'source ' . v:this_session
"endif
augroup ada_session
autocmd!
autocmd VimLeavePre * execute 'mksession! ' . v:this_session
augroup END
"if exists ("g:Tlist_Auto_Open") && g:Tlist_Auto_Open
"TlistOpen
"endif
endif
let v:this_session = a:New_Session
if filereadable (v:this_session)
execute 'source ' . v:this_session
endif
augroup ada_session
autocmd!
autocmd VimLeavePre * execute 'mksession! ' . v:this_session
augroup END
endif
finally
let &sessionoptions=l:sessionoptions
endtry
return
endfunction ada#Switch_Session "}}}1
endfunction ada#Switch_Session
" Section: GNAT Pretty Printer folding {{{1
"
@@ -546,18 +571,23 @@ function ada#Map_Menu (Text, Keys, Command)
\ a:Keys .
\" <C-O>:" . a:Command . "<CR>"
else
if exists("g:mapleader")
let l:leader = g:mapleader
else
let l:leader = '\'
endif
execute
\ "50amenu " .
\ "Ada." . escape(a:Text, ' ') .
\ "<Tab>" . escape(g:mapleader . "a" . a:Keys , '\') .
\ "<Tab>" . escape(l:leader . "a" . a:Keys , '\') .
\ " :" . a:Command . "<CR>"
execute
\ "nnoremap <buffer>" .
\ escape(g:mapleader . "a" . a:Keys , '\') .
\ escape(l:leader . "a" . a:Keys , '\') .
\" :" . a:Command
execute
\ "inoremap <buffer>" .
\ escape(g:mapleader . "a" . a:Keys , '\') .
\ escape(l:leader . "a" . a:Keys , '\') .
\" <C-O>:" . a:Command
endif
return
@@ -566,10 +596,15 @@ endfunction
" Section: ada#Map_Popup {{{2
"
function ada#Map_Popup (Text, Keys, Command)
if exists("g:mapleader")
let l:leader = g:mapleader
else
let l:leader = '\'
endif
execute
\ "50amenu " .
\ "PopUp." . escape(a:Text, ' ') .
\ "<Tab>" . escape(g:mapleader . "a" . a:Keys , '\') .
\ "<Tab>" . escape(l:leader . "a" . a:Keys , '\') .
\ " :" . a:Command . "<CR>"
call ada#Map_Menu (a:Text, a:Keys, a:Command)
+2 -2
View File
@@ -5,9 +5,9 @@
" Maintainer: Martin Krischik
" $Author$
" $Date$
" Version: 4.2
" Version: 4.6
" $Revision$
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $
" History: 24.05.2006 MK Unified Headers
" 26.05.2006 MK improved search for begin of word.
" 16.07.2006 MK Ada-Mode as vim-ball
+23 -2
View File
@@ -1,7 +1,7 @@
" Vim completion script
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 May 08
" Last Change: 2007 Aug 30
" This function is used for the 'omnifunc' option.
@@ -119,6 +119,27 @@ function! ccomplete#Complete(findstart, base)
" TODO: join previous line if it makes sense
let line = getline('.')
let col = col('.')
if stridx(strpart(line, 0, col), ';') != -1
" Handle multiple declarations on the same line.
let col2 = col - 1
while line[col2] != ';'
let col2 -= 1
endwhile
let line = strpart(line, col2 + 1)
let col -= col2
endif
if stridx(strpart(line, 0, col), ',') != -1
" Handle multiple declarations on the same line in a function
" declaration.
let col2 = col - 1
while line[col2] != ','
let col2 -= 1
endwhile
if strpart(line, col2 + 1, col - col2 - 1) =~ ' *[^ ][^ ]* *[^ ]'
let line = strpart(line, col2 + 1)
let col -= col2
endif
endif
if len(items) == 1
" Completing one word and it's a local variable: May add '[', '.' or
" '->'.
@@ -140,7 +161,7 @@ function! ccomplete#Complete(findstart, base)
let res = [{'match': match, 'tagline' : '', 'kind' : kind, 'info' : line}]
else
" Completing "var.", "var.something", etc.
let res = s:Nextitem(strpart(line, 0, col), items[1:], 0, 1)
let res = s:Nextitem(strpart(line, 0, col), items[-1], 0, 1)
endif
endif
+4 -4
View File
@@ -3,12 +3,12 @@
" Language: Ada (Dec Ada)
" $Id$
" Copyright: Copyright (C) 2006 Martin Krischik
" Maintainer: Martin Krischik
" Maintainer: Martin Krischik <krischik@users.sourceforge.net>
" $Author$
" $Date$
" Version: 4.2
" Version: 4.6
" $Revision$
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $
" History: 21.07.2006 MK New Dec Ada
" 15.10.2006 MK Bram's suggestion for runtime integration
" 05.11.2006 MK Bram suggested not to use include protection for
@@ -45,7 +45,7 @@ function decada#Set_Session (...) dict " {{{1
call ada#Switch_Session (a:1)
elseif argc() == 0 && strlen (v:servername) > 0
call ada#Switch_Session (
\ expand('~')[0:-2] . ".vimfiles.session]" .
\ expand('~')[0:-2] . ".vimfiles.session]decada_" .
\ v:servername . ".vim")
endif
return
+356 -275
View File
@@ -1,8 +1,8 @@
" ---------------------------------------------------------------------
" getscript.vim
" Author: Charles E. Campbell, Jr.
" Date: May 11, 2007
" Version: 27
" Date: Jul 10, 2008
" Version: 31
" Installing: :help glvs-install
" Usage: :help glvs
"
@@ -11,7 +11,7 @@
" ---------------------------------------------------------------------
" Initialization: {{{1
" if you're sourcing this file, surely you can't be
" expecting vim to be in its vi-compatible mode
" expecting vim to be in its vi-compatible mode!
if &cp
echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
finish
@@ -23,11 +23,44 @@ set cpo&vim
if exists("g:loaded_getscript")
finish
endif
let g:loaded_getscript= "v27"
let g:loaded_getscript= "v31"
" ---------------------------------------------------------------------
" Global Variables: {{{1
" allow user to change the command for obtaining scripts (does fetch work?)
" ---------------------------
" Global Variables: {{{1
" ---------------------------
" Cygwin Detection ------- {{{2
if !exists("g:getscript_cygwin")
if has("win32") || has("win95") || has("win64") || has("win16")
if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
let g:getscript_cygwin= 1
else
let g:getscript_cygwin= 0
endif
else
let g:getscript_cygwin= 0
endif
endif
" shell quoting character {{{2
if exists("g:netrw_shq") && !exists("g:getscript_shq")
let g:getscript_shq= g:netrw_shq
elseif !exists("g:getscript_shq")
if exists("&shq") && &shq != ""
let g:getscript_shq= &shq
elseif exists("&sxq") && &sxq != ""
let g:getscript_shq= &sxq
elseif has("win32") || has("win95") || has("win64") || has("win16")
if g:getscript_cygwin
let g:getscript_shq= "'"
else
let g:getscript_shq= '"'
endif
else
let g:getscript_shq= "'"
endif
" call Decho("g:getscript_shq<".g:getscript_shq.">")
endif
" wget vs curl {{{2
if !exists("g:GetLatestVimScripts_wget")
if executable("wget")
let g:GetLatestVimScripts_wget= "wget"
@@ -93,262 +126,6 @@ com! -nargs=0 GetLatestVimScripts call getscript#GetLatestVimScripts()
com! -nargs=0 GetScript call getscript#GetLatestVimScripts()
silent! com -nargs=0 GLVS call getscript#GetLatestVimScripts()
" ---------------------------------------------------------------------
" GetOneScript: (Get Latest Vim Script) this function operates {{{1
" on the current line, interpreting two numbers and text as
" ScriptID, SourceID, and Filename.
" It downloads any scripts that have newer versions from vim.sf.net.
fun! s:GetOneScript(...)
" call Dfunc("GetOneScript()")
" set options to allow progress to be shown on screen
let t_ti= &t_ti
let t_te= &t_te
let rs = &rs
set t_ti= t_te= nors
" put current line on top-of-screen and interpret it into
" a script identifer : used to obtain webpage
" source identifier : used to identify current version
" and an associated comment: used to report on what's being considered
if a:0 >= 3
let scriptid = a:1
let srcid = a:2
let fname = a:3
let cmmnt = ""
" call Decho("scriptid<".scriptid.">")
" call Decho("srcid <".srcid.">")
" call Decho("fname <".fname.">")
else
let curline = getline(".")
if curline =~ '^\s*#'
" call Dret("GetOneScript : skipping a pure comment line")
return
endif
let parsepat = '^\s*\(\d\+\)\s\+\(\d\+\)\s\+\(.\{-}\)\(\s*#.*\)\=$'
try
let scriptid = substitute(curline,parsepat,'\1','e')
catch /^Vim\%((\a\+)\)\=:E486/
let scriptid= 0
endtry
try
let srcid = substitute(curline,parsepat,'\2','e')
catch /^Vim\%((\a\+)\)\=:E486/
let srcid= 0
endtry
try
let fname= substitute(curline,parsepat,'\3','e')
catch /^Vim\%((\a\+)\)\=:E486/
let fname= ""
endtry
try
let cmmnt= substitute(curline,parsepat,'\4','e')
catch /^Vim\%((\a\+)\)\=:E486/
let cmmnt= ""
endtry
" call Decho("curline <".curline.">")
" call Decho("parsepat<".parsepat.">")
" call Decho("scriptid<".scriptid.">")
" call Decho("srcid <".srcid.">")
" call Decho("fname <".fname.">")
endif
if scriptid == 0 || srcid == 0
" When looking for :AutoInstall: lines, skip scripts that
" have 0 0 scriptname
" call Dret("GetOneScript : skipping a scriptid==srcid==0 line")
return
endif
let doautoinstall= 0
if fname =~ ":AutoInstall:"
" call Decho("fname<".fname."> has :AutoInstall:...")
let aicmmnt= substitute(fname,'\s\+:AutoInstall:\s\+',' ','')
" call Decho("aicmmnt<".aicmmnt."> s:autoinstall=".s:autoinstall)
if s:autoinstall != ""
let doautoinstall = g:GetLatestVimScripts_allowautoinstall
endif
else
let aicmmnt= fname
endif
" call Decho("aicmmnt<".aicmmnt.">: doautoinstall=".doautoinstall)
exe "norm z\<CR>"
redraw!
" call Decho('considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid)
echomsg 'considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid
" grab a copy of the plugin's vim.sf.net webpage
let scriptaddr = 'http://vim.sf.net/script.php?script_id='.scriptid
let tmpfile = tempname()
let v:errmsg = ""
" make up to three tries at downloading the description
let itry= 1
while itry <= 3
" call Decho("try#".itry." to download description of <".aicmmnt."> with addr=".scriptaddr)
if has("win32") || has("win16") || has("win95")
" call Decho("silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile.' "'.scriptaddr.'"')
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile.' "'.scriptaddr.'"'
else
" call Decho("silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile." '".scriptaddr."'")
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile." '".scriptaddr."'"
endif
if itry == 1
exe "silent vsplit ".tmpfile
else
silent! e %
endif
" find the latest source-id in the plugin's webpage
silent! 1
let findpkg= search('Click on the package to download','W')
if findpkg > 0
break
endif
let itry= itry + 1
endwhile
" call Decho(" --- end downloading tries while loop --- itry=".itry)
" testing: did finding "Click on the package..." fail?
if findpkg == 0 || itry >= 4
silent q!
call delete(tmpfile)
" restore options
let &t_ti = t_ti
let &t_te = t_te
let &rs = rs
let s:downerrors = s:downerrors + 1
" call Decho("***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">")
echomsg "***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">"
" call Dret("GetOneScript : srch for /Click on the package/ failed")
return
endif
" call Decho('found "Click on the package to download"')
let findsrcid= search('src_id=','W')
if findsrcid == 0
silent q!
call delete(tmpfile)
" restore options
let &t_ti = t_ti
let &t_te = t_te
let &rs = rs
let s:downerrors = s:downerrors + 1
" call Decho("***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">")
echomsg "***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">"
" call Dret("GetOneScript : srch for /src_id/ failed")
return
endif
" call Decho('found "src_id=" in description page')
let srcidpat = '^\s*<td class.*src_id=\(\d\+\)">\([^<]\+\)<.*$'
let latestsrcid= substitute(getline("."),srcidpat,'\1','')
let sname = substitute(getline("."),srcidpat,'\2','') " script name actually downloaded
" call Decho("srcidpat<".srcidpat."> latestsrcid<".latestsrcid."> sname<".sname.">")
silent q!
call delete(tmpfile)
" convert the strings-of-numbers into numbers
let srcid = srcid + 0
let latestsrcid = latestsrcid + 0
" call Decho("srcid=".srcid." latestsrcid=".latestsrcid." sname<".sname.">")
" has the plugin's most-recent srcid increased, which indicates
" that it has been updated
if latestsrcid > srcid
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."]: need to update <".sname.">")
let s:downloads= s:downloads + 1
if sname == bufname("%")
" GetLatestVimScript has to be careful about downloading itself
let sname= "NEW_".sname
endif
" the plugin has been updated since we last obtained it, so download a new copy
" call Decho("...downloading new <".sname.">")
echomsg "...downloading new <".sname.">"
if has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95")
" call Decho("windows: silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"')
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"'
else
" call Decho("unix: silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'")
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'"
endif
" AutoInstall: only if doautoinstall is so indicating
if doautoinstall
" call Decho("attempting to do autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname))
if filereadable(sname)
" call Decho("move <".sname."> to ".s:autoinstall)
exe "silent !".g:GetLatestVimScripts_mv." ".sname." ".s:autoinstall
let curdir= escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #")
" call Decho("exe cd ".s:autoinstall)
exe "cd ".s:autoinstall
" decompress
if sname =~ '\.bz2$'
" call Decho("decompress: attempt to bunzip2 ".sname)
exe "silent !bunzip2 ".sname
let sname= substitute(sname,'\.bz2$','','')
" call Decho("decompress: new sname<".sname."> after bunzip2")
elseif sname =~ '\.gz$'
" call Decho("decompress: attempt to gunzip ".sname)
exe "silent !gunzip ".sname
let sname= substitute(sname,'\.gz$','','')
" call Decho("decompress: new sname<".sname."> after gunzip")
endif
" distribute archive(.zip, .tar, .vba) contents
if sname =~ '\.zip$'
" call Decho("dearchive: attempt to unzip ".sname)
exe "silent !unzip -o ".sname
elseif sname =~ '\.tar$'
" call Decho("dearchive: attempt to untar ".sname)
exe "silent !tar -xvf ".sname
elseif sname =~ '\.vba$'
" call Decho("dearchive: attempt to handle a vimball: ".sname)
silent 1split
exe "silent e ".sname
silent so %
silent q
endif
if sname =~ '.vim$'
" call Decho("dearchive: attempt to simply move ".sname." to plugin")
exe "silent !".g:GetLatestVimScripts_mv." ".sname." plugin"
endif
" helptags step
let docdir= substitute(&rtp,',.*','','e')."/doc"
" call Decho("helptags: docdir<".docdir.">")
exe "helptags ".docdir
exe "cd ".curdir
endif
if fname !~ ':AutoInstall:'
let modline=scriptid." ".latestsrcid." :AutoInstall: ".fname.cmmnt
else
let modline=scriptid." ".latestsrcid." ".fname.cmmnt
endif
else
let modline=scriptid." ".latestsrcid." ".fname.cmmnt
endif
" update the data in the <GetLatestVimScripts.dat> file
call setline(line("."),modline)
" call Decho("update data in ".expand("%")."#".line(".").": modline<".modline.">")
" else " Decho
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."], no need to update")
endif
" restore options
let &t_ti= t_ti
let &t_te= t_te
let &rs = rs
" call Dret("GetOneScript")
endfun
" ---------------------------------------------------------------------
" GetLatestVimScripts: this function gets the latest versions of {{{1
" scripts based on the list in
@@ -363,6 +140,12 @@ fun! getscript#GetLatestVimScripts()
return
endif
" insure that fnameescape() is available
if !exists("*fnameescape")
echoerr "GetLatestVimScripts needs fnameescape() (provided by 7.1.299 or later)"
return
endif
" Find the .../GetLatest subdirectory under the runtimepath
for datadir in split(&rtp,',') + ['']
if isdirectory(datadir."/GetLatest")
@@ -404,14 +187,17 @@ fun! getscript#GetLatestVimScripts()
" don't let any events interfere (like winmanager's, taglist's, etc)
let eikeep= &ei
set ei=all
let hlskeep= &hls
set ei=all hls&vim
" record current directory, change to datadir, open split window with
" datafile
let origdir= getcwd()
exe "cd ".escape(substitute(datadir,'\','/','ge'),"|[]*'\" #")
" call Decho("exe cd ".fnameescape(substitute(datadir,'\','/','ge')))
exe "cd ".fnameescape(substitute(datadir,'\','/','ge'))
split
exe "e ".escape(substitute(datafile,'\','/','ge'),"|[]*'\" #")
" call Decho("exe e ".fnameescape(substitute(datafile,'\','/','ge')))
exe "e ".fnameescape(substitute(datafile,'\','/','ge'))
res 1000
let s:downloads = 0
let s:downerrors= 0
@@ -421,36 +207,41 @@ fun! getscript#GetLatestVimScripts()
" call Decho("searching plugins for GetLatestVimScripts dependencies")
let lastline = line("$")
" call Decho("lastline#".lastline)
let plugins = split(globpath(&rtp,"plugin/*.vim"))
let plugins = split(globpath(&rtp,"plugin/*.vim"),'\n')
let foundscript = 0
let firstdir= ""
for plugin in plugins
" call Decho("plugin<".plugin.">")
" don't process plugins in system directories
if firstdir == ""
let firstdir= substitute(plugin,'[/\\][^/\\]\+$','','')
" call Decho("firstdir<".firstdir.">")
" call Decho("setting firstdir<".firstdir.">")
else
let curdir= substitute(plugin,'[/\\][^/\\]\+$','','')
" call Decho("curdir<".curdir.">")
if curdir != firstdir
" call Decho("skipping subsequent plugins: curdir<".curdir."> != firstdir<".firstdir.">")
break
endif
endif
" read plugin in
" evidently a :r creates a new buffer (the "#" buffer) that is subsequently unused -- bwiping it
$
" call Decho(" ")
" call Decho(".dependency checking<".plugin."> line$=".line("$"))
exe "silent r ".plugin
" call Decho("exe silent r ".fnameescape(plugin))
exe "silent r ".fnameescape(plugin)
exe "silent bwipe ".bufnr("#")
while search('^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+','W') != 0
let newscript= substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+\s\+\(.*\)$','\1','e')
let llp1 = lastline+1
" call Decho("..newscript<".newscript.">")
" don't process ""GetLatestVimScripts lines
" don't process ""GetLatestVimScripts lines -- those that have been doubly-commented out
if newscript !~ '^"'
" found a "GetLatestVimScripts: # #" line in the script; check if its already in the datafile
let curline = line(".")
@@ -485,14 +276,15 @@ fun! getscript#GetLatestVimScripts()
endfor
" call Decho("--- end dependency checking loop --- foundscript=".foundscript)
" call Decho(" ")
" call Dredir("BUFFER TEST (GetLatestVimScripts 1)","ls!")
if foundscript == 0
set nomod
setlocal nomod
endif
" Check on out-of-date scripts using GetLatest/GetLatestVimScripts.dat
" call Decho("begin: checking out-of-date scripts using datafile<".datafile.">")
set lz
setlocal lz
1
" /^-----/,$g/^\s*\d/call Decho(getline("."))
1
@@ -529,14 +321,303 @@ fun! getscript#GetLatestVimScripts()
q
" restore events and current directory
exe "cd ".escape(substitute(origdir,'\','/','ge'),"|[]*'\" #")
exe "cd ".fnameescape(substitute(origdir,'\','/','ge'))
let &ei= eikeep
set nolz
let &hls= hlskeep
setlocal nolz
" call Dredir("BUFFER TEST (GetLatestVimScripts 2)","ls!")
" call Dret("GetLatestVimScripts : did ".s:downloads." downloads")
endfun
" ---------------------------------------------------------------------
" ---------------------------------------------------------------------
" GetOneScript: (Get Latest Vim Script) this function operates {{{1
" on the current line, interpreting two numbers and text as
" ScriptID, SourceID, and Filename.
" It downloads any scripts that have newer versions from vim.sf.net.
fun! s:GetOneScript(...)
" call Dfunc("GetOneScript()")
" set options to allow progress to be shown on screen
let rega= @a
let t_ti= &t_ti
let t_te= &t_te
let rs = &rs
set t_ti= t_te= nors
" put current line on top-of-screen and interpret it into
" a script identifer : used to obtain webpage
" source identifier : used to identify current version
" and an associated comment: used to report on what's being considered
if a:0 >= 3
let scriptid = a:1
let srcid = a:2
let fname = a:3
let cmmnt = ""
" call Decho("scriptid<".scriptid.">")
" call Decho("srcid <".srcid.">")
" call Decho("fname <".fname.">")
else
let curline = getline(".")
if curline =~ '^\s*#'
let @a= rega
" call Dret("GetOneScript : skipping a pure comment line")
return
endif
let parsepat = '^\s*\(\d\+\)\s\+\(\d\+\)\s\+\(.\{-}\)\(\s*#.*\)\=$'
try
let scriptid = substitute(curline,parsepat,'\1','e')
catch /^Vim\%((\a\+)\)\=:E486/
let scriptid= 0
endtry
try
let srcid = substitute(curline,parsepat,'\2','e')
catch /^Vim\%((\a\+)\)\=:E486/
let srcid= 0
endtry
try
let fname= substitute(curline,parsepat,'\3','e')
catch /^Vim\%((\a\+)\)\=:E486/
let fname= ""
endtry
try
let cmmnt= substitute(curline,parsepat,'\4','e')
catch /^Vim\%((\a\+)\)\=:E486/
let cmmnt= ""
endtry
" call Decho("curline <".curline.">")
" call Decho("parsepat<".parsepat.">")
" call Decho("scriptid<".scriptid.">")
" call Decho("srcid <".srcid.">")
" call Decho("fname <".fname.">")
endif
if scriptid == 0 || srcid == 0
" When looking for :AutoInstall: lines, skip scripts that have 0 0 scriptname
let @a= rega
" call Dret("GetOneScript : skipping a scriptid==srcid==0 line")
return
endif
let doautoinstall= 0
if fname =~ ":AutoInstall:"
" call Decho("case AutoInstall: fname<".fname.">")
let aicmmnt= substitute(fname,'\s\+:AutoInstall:\s\+',' ','')
" call Decho("aicmmnt<".aicmmnt."> s:autoinstall=".s:autoinstall)
if s:autoinstall != ""
let doautoinstall = g:GetLatestVimScripts_allowautoinstall
endif
else
let aicmmnt= fname
endif
" call Decho("aicmmnt<".aicmmnt.">: doautoinstall=".doautoinstall)
exe "norm z\<CR>"
redraw!
" call Decho('considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid)
echo 'considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid
" grab a copy of the plugin's vim.sf.net webpage
let scriptaddr = 'http://vim.sf.net/script.php?script_id='.scriptid
let tmpfile = tempname()
let v:errmsg = ""
" make up to three tries at downloading the description
let itry= 1
while itry <= 3
" call Decho("try#".itry." to download description of <".aicmmnt."> with addr=".scriptaddr)
if has("win32") || has("win16") || has("win95")
" call Decho("new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(tmpfile).' '.s:Escape(scriptaddr)."|bw!")
new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(tmpfile).' '.s:Escape(scriptaddr)|bw!
else
" call Decho("exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(tmpfile)." ".s:Escape(scriptaddr))
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(tmpfile)." ".s:Escape(scriptaddr)
endif
if itry == 1
exe "silent vsplit ".fnameescape(tmpfile)
else
silent! e %
endif
setlocal bh=wipe
" find the latest source-id in the plugin's webpage
silent! 1
let findpkg= search('Click on the package to download','W')
if findpkg > 0
break
endif
let itry= itry + 1
endwhile
" call Decho(" --- end downloading tries while loop --- itry=".itry)
" testing: did finding "Click on the package..." fail?
if findpkg == 0 || itry >= 4
silent q!
call delete(tmpfile)
" restore options
let &t_ti = t_ti
let &t_te = t_te
let &rs = rs
let s:downerrors = s:downerrors + 1
" call Decho("***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">")
echomsg "***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">"
" call Dret("GetOneScript : srch for /Click on the package/ failed")
let @a= rega
return
endif
" call Decho('found "Click on the package to download"')
let findsrcid= search('src_id=','W')
if findsrcid == 0
silent q!
call delete(tmpfile)
" restore options
let &t_ti = t_ti
let &t_te = t_te
let &rs = rs
let s:downerrors = s:downerrors + 1
" call Decho("***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">")
echomsg "***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">"
let @a= rega
" call Dret("GetOneScript : srch for /src_id/ failed")
return
endif
" call Decho('found "src_id=" in description page')
let srcidpat = '^\s*<td class.*src_id=\(\d\+\)">\([^<]\+\)<.*$'
let latestsrcid= substitute(getline("."),srcidpat,'\1','')
let sname = substitute(getline("."),srcidpat,'\2','') " script name actually downloaded
" call Decho("srcidpat<".srcidpat."> latestsrcid<".latestsrcid."> sname<".sname.">")
silent q!
call delete(tmpfile)
" convert the strings-of-numbers into numbers
let srcid = srcid + 0
let latestsrcid = latestsrcid + 0
" call Decho("srcid=".srcid." latestsrcid=".latestsrcid." sname<".sname.">")
" has the plugin's most-recent srcid increased, which indicates
" that it has been updated
if latestsrcid > srcid
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."]: need to update <".sname.">")
let s:downloads= s:downloads + 1
if sname == bufname("%")
" GetLatestVimScript has to be careful about downloading itself
let sname= "NEW_".sname
endif
" the plugin has been updated since we last obtained it, so download a new copy
" call Decho("...downloading new <".sname.">")
echomsg "...downloading new <".sname.">"
if has("win32") || has("win16") || has("win95")
" call Decho("new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid)."|q")
new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid)|q
else
" call Decho("exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id='))
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id=').latestsrcid
endif
" AutoInstall: only if doautoinstall has been requested by the plugin itself
if doautoinstall
" call Decho("attempting to do autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname))
if filereadable(sname)
" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".s:Escape(sname)." ".s:Escape(s:autoinstall))
exe "silent !".g:GetLatestVimScripts_mv." ".s:Escape(sname)." ".s:Escape(s:autoinstall)
let curdir = escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #")
let installdir= curdir."/Installed"
if !isdirectory(installdir)
call mkdir(installdir)
endif
" call Decho("exe cd ".fnameescape(s:autoinstall))
exe "cd ".fnameescape(s:autoinstall)
" decompress
if sname =~ '\.bz2$'
" call Decho("decompress: attempt to bunzip2 ".sname)
exe "silent !bunzip2 ".s:Escape(sname)
let sname= substitute(sname,'\.bz2$','','')
" call Decho("decompress: new sname<".sname."> after bunzip2")
elseif sname =~ '\.gz$'
" call Decho("decompress: attempt to gunzip ".sname)
exe "silent !gunzip ".s:Escape(sname)
let sname= substitute(sname,'\.gz$','','')
" call Decho("decompress: new sname<".sname."> after gunzip")
endif
" distribute archive(.zip, .tar, .vba) contents
if sname =~ '\.zip$'
" call Decho("dearchive: attempt to unzip ".sname)
exe "silent !unzip -o ".s:Escape(sname)
elseif sname =~ '\.tar$'
" call Decho("dearchive: attempt to untar ".sname)
exe "silent !tar -xvf ".s:Escape(sname)
elseif sname =~ '\.vba$'
" call Decho("dearchive: attempt to handle a vimball: ".sname)
silent 1split
exe "silent e ".fnameescape(sname)
silent so %
silent q
endif
if sname =~ '.vim$'
" call Decho("dearchive: attempt to simply move ".sname." to plugin")
exe "silent !".g:GetLatestVimScripts_mv." ".s:Escape(sname)." plugin"
else
" call Decho("dearchive: move <".sname."> to installdir<".installdir.">")
exe "silent !".g:GetLatestVimScripts_mv." ".s:Escape(sname)." ".installdir
endif
" helptags step
let docdir= substitute(&rtp,',.*','','e')."/doc"
" call Decho("helptags: docdir<".docdir.">")
exe "helptags ".fnameescape(docdir)
exe "cd ".fnameescape(curdir)
endif
if fname !~ ':AutoInstall:'
let modline=scriptid." ".latestsrcid." :AutoInstall: ".fname.cmmnt
else
let modline=scriptid." ".latestsrcid." ".fname.cmmnt
endif
else
let modline=scriptid." ".latestsrcid." ".fname.cmmnt
endif
" update the data in the <GetLatestVimScripts.dat> file
call setline(line("."),modline)
" call Decho("update data in ".expand("%")."#".line(".").": modline<".modline.">")
" else " Decho
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."], no need to update")
endif
" restore options
let &t_ti = t_ti
let &t_te = t_te
let &rs = rs
let @a = rega
" call Dredir("BUFFER TEST (GetOneScript)","ls!")
" call Dret("GetOneScript")
endfun
" ---------------------------------------------------------------------
" s:Escape: makes a string safe&suitable for the shell {{{2
fun! s:Escape(name)
" call Dfunc("s:Escape(name<".a:name.">)")
if exists("*shellescape")
" shellescape() was added by patch 7.0.111
let name= shellescape(a:name)
else
let name= g:getscript_shq . a:name . g:getscript_shq
endif
" call Dret("s:Escape ".name)
return name
endfun
" ---------------------------------------------------------------------
" Restore Options: {{{1
let &cpo= s:keepcpo
unlet s:keepcpo
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim: ts=8 sts=2 fdm=marker nowrap
+18 -10
View File
@@ -3,12 +3,13 @@
" Language: Ada (GNAT)
" $Id$
" Copyright: Copyright (C) 2006 Martin Krischik
" Maintainer: Martin Krischik
" Maintainer: Martin Krischi <krischik@users.sourceforge.net>k
" Ned Okie <nokie@radford.edu>
" $Author$
" $Date$
" Version: 4.2
" Version: 4.6
" $Revision$
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/gnat.vim $
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/gnat.vim $
" History: 24.05.2006 MK Unified Headers
" 16.07.2006 MK Ada-Mode as vim-ball
" 05.08.2006 MK Add session support
@@ -16,6 +17,7 @@
" 05.11.2006 MK Bram suggested not to use include protection for
" autoload
" 05.11.2006 MK Bram suggested to save on spaces
" 19.09.2007 NO use project file only when there is a project
" Help Page: compiler-gnat
"------------------------------------------------------------------------------
@@ -71,13 +73,19 @@ function gnat#Set_Project_File (...) dict " {{{1
execute 'mksession! ' . v:this_session
endif
if strlen (self.Project_File) > 0
call ada#Switch_Session (
\ expand('~') . "/vimfiles/session/" .
\ fnamemodify (self.Project_File, ":t:r") . ".vim")
else
call ada#Switch_Session ('')
endif
"if strlen (self.Project_File) > 0
"if has("vms")
"call ada#Switch_Session (
"\ expand('~')[0:-2] . ".vimfiles.session]gnat_" .
"\ fnamemodify (self.Project_File, ":t:r") . ".vim")
"else
"call ada#Switch_Session (
"\ expand('~') . "/vimfiles/session/gnat_" .
"\ fnamemodify (self.Project_File, ":t:r") . ".vim")
"endif
"else
"call ada#Switch_Session ('')
"endif
return
endfunction gnat#Set_Project_File " }}}1
+26 -14
View File
@@ -1,6 +1,6 @@
" Vim autoload file for editing compressed files.
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2007 May 10
" Last Change: 2008 Jul 04
" These functions are used by the gzip plugin.
@@ -73,8 +73,15 @@ fun gzip#read(cmd)
let empty = line("'[") == 1 && line("']") == line("$")
let tmp = tempname()
let tmpe = tmp . "." . expand("<afile>:e")
if exists('*fnameescape')
let tmp_esc = fnameescape(tmp)
let tmpe_esc = fnameescape(tmpe)
else
let tmp_esc = escape(tmp, ' ')
let tmpe_esc = escape(tmpe, ' ')
endif
" write the just read lines to a temp file "'[,']w tmp.gz"
execute "silent '[,']w " . escape(tmpe, ' ')
execute "silent '[,']w " . tmpe_esc
" uncompress the temp file: call system("gzip -dn tmp.gz")
call system(a:cmd . " " . s:escape(tmpe))
if !filereadable(tmp)
@@ -95,12 +102,12 @@ fun gzip#read(cmd)
setlocal nobin
if exists(":lockmarks")
if empty
execute "silent lockmarks " . l . "r ++edit " . tmp
execute "silent lockmarks " . l . "r ++edit " . tmp_esc
else
execute "silent lockmarks " . l . "r " . tmp
execute "silent lockmarks " . l . "r " . tmp_esc
endif
else
execute "silent " . l . "r " . tmp
execute "silent " . l . "r " . tmp_esc
endif
" if buffer became empty, delete trailing blank line
@@ -110,8 +117,8 @@ fun gzip#read(cmd)
endif
" delete the temp file and the used buffers
call delete(tmp)
silent! exe "bwipe " . tmp
silent! exe "bwipe " . tmpe
silent! exe "bwipe " . tmp_esc
silent! exe "bwipe " . tmpe_esc
endif
" Restore saved option values.
@@ -124,10 +131,15 @@ fun gzip#read(cmd)
" When uncompressed the whole buffer, do autocommands
if ok && empty
if &verbose >= 8
execute "doau BufReadPost " . expand("%:r")
if exists('*fnameescape')
let fname = fnameescape(expand("%:r"))
else
execute "silent! doau BufReadPost " . expand("%:r")
let fname = escape(expand("%:r"), " \t\n*?[{`$\\%#'\"|!<")
endif
if &verbose >= 8
execute "doau BufReadPost " . fname
else
execute "silent! doau BufReadPost " . fname
endif
endif
endfun
@@ -141,9 +153,9 @@ fun gzip#write(cmd)
let nmt = s:tempname(nm)
if rename(nm, nmt) == 0
if exists("b:gzip_comp_arg")
call system(a:cmd . " " . b:gzip_comp_arg . " " . s:escape(nmt))
call system(a:cmd . " " . b:gzip_comp_arg . " -- " . s:escape(nmt))
else
call system(a:cmd . " " . s:escape(nmt))
call system(a:cmd . " -- " . s:escape(nmt))
endif
call rename(nmt . "." . expand("<afile>:e"), nm)
endif
@@ -168,10 +180,10 @@ fun gzip#appre(cmd)
if rename(nm, nmte) == 0
if &patchmode != "" && getfsize(nm . &patchmode) == -1
" Create patchmode file by creating the decompressed file new
call system(a:cmd . " -c " . s:escape(nmte) . " > " . s:escape(nmt))
call system(a:cmd . " -c -- " . s:escape(nmte) . " > " . s:escape(nmt))
call rename(nmte, nm . &patchmode)
else
call system(a:cmd . " " . s:escape(nmte))
call system(a:cmd . " -- " . s:escape(nmte))
endif
call rename(nmt, nm)
endif
+5691 -3280
View File
File diff suppressed because it is too large Load Diff
+26 -15
View File
@@ -1,7 +1,7 @@
" netrwSettings.vim: makes netrw settings simpler
" Date: Mar 26, 2007
" Date: Jul 02, 2008
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" Version: 9
" Version: 12
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell, Jr. {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
@@ -19,13 +19,13 @@
if exists("g:loaded_netrwSettings") || &cp
finish
endif
let g:loaded_netrwSettings = "v9"
let g:loaded_netrwSettings = "v12"
" ---------------------------------------------------------------------
" NetrwSettings: {{{1
fun! netrwSettings#NetrwSettings()
" this call is here largely just to insure that netrw has been loaded
call netrw#NetSavePosn()
call netrw#NetrwSavePosn()
if !exists("g:loaded_netrw")
echohl WarningMsg | echomsg "***sorry*** netrw needs to be loaded prior to using NetrwSettings" | echohl None
return
@@ -82,8 +82,6 @@ fun! netrwSettings#NetrwSettings()
put = 'let g:netrw_ftpmode = '.g:netrw_ftpmode
put = 'let g:netrw_ignorenetrc = '.g:netrw_ignorenetrc
put = 'let g:netrw_sshport = '.g:netrw_sshport
let shqline= line("$")
put = 'let g:netrw_shq...'
put = 'let g:netrw_use_nt_rcp = '.g:netrw_use_nt_rcp
put = 'let g:netrw_win95ftp = '.g:netrw_win95ftp
let s:netrw_xfer_stop= line(".")
@@ -101,35 +99,51 @@ fun! netrwSettings#NetrwSettings()
else
put = 'let g:netrw_browsex_viewer = (not defined)'
endif
put = 'let g:netrw_compress = '.g:netrw_compress
let decompressline= line("$")
put ='let g:netrw_decompress...'
put = 'let g:netrw_dirhistmax = '.g:netrw_dirhistmax
put = 'let g:netrw_fastbrowse = '.g:netrw_fastbrowse
let fnameescline= line("$")
put = 'let g:netrw_fname_escape...'
put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject
put = 'let g:netrw_ftp_list_cmd = '.g:netrw_ftp_list_cmd
put = 'let g:netrw_ftp_sizelist_cmd = '.g:netrw_ftp_sizelist_cmd
put = 'let g:netrw_ftp_timelist_cmd = '.g:netrw_ftp_timelist_cmd
let globescline= line("$")
put ='let g:netrw_glob_escape...'
put = 'let g:netrw_hide = '.g:netrw_hide
put = 'let g:netrw_keepdir = '.g:netrw_keepdir
put = 'let g:netrw_list_cmd = '.g:netrw_list_cmd
put = 'let g:netrw_list_hide = '.g:netrw_list_hide
put = 'let g:netrw_local_mkdir = '.g:netrw_local_mkdir
put = 'let g:netrw_local_rmdir = '.g:netrw_local_rmdir
put = 'let g:netrw_liststyle = '.g:netrw_liststyle
put = 'let g:netrw_localcopycmd = '.g:netrw_localcopycmd
put = 'let g:netrw_local_mkdir = '.g:netrw_local_mkdir
put = 'let g:netrw_localmovecmd = '.g:netrw_localmovecmd
put = 'let g:netrw_local_rmdir = '.g:netrw_local_rmdir
put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen
put = 'let g:netrw_menu = '.g:netrw_menu
put = 'let g:netrw_mkdir_cmd = '.g:netrw_mkdir_cmd
put = 'let g:netrw_preview = '.g:netrw_preview
put = 'let g:netrw_rename_cmd = '.g:netrw_rename_cmd
put = 'let g:netrw_retmap = '.g:netrw_retmap
put = 'let g:netrw_rm_cmd = '.g:netrw_rm_cmd
put = 'let g:netrw_rmdir_cmd = '.g:netrw_rmdir_cmd
put = 'let g:netrw_rmf_cmd = '.g:netrw_rmf_cmd
put = 'let g:netrw_silent = '.g:netrw_silent
put = 'let g:netrw_sort_by = '.g:netrw_sort_by
put = 'let g:netrw_sort_direction = '.g:netrw_sort_direction
put = 'let g:netrw_sort_options = '.g:netrw_sort_options
put = 'let g:netrw_sort_sequence = '.g:netrw_sort_sequence
put = 'let g:netrw_special_syntax = '.g:netrw_special_syntax
put = 'let g:netrw_ssh_browse_reject = '.g:netrw_ssh_browse_reject
put = 'let g:netrw_scpport = '.g:netrw_scpport
put = 'let g:netrw_sshport = '.g:netrw_sshport
put = 'let g:netrw_timefmt = '.g:netrw_timefmt
let tmpfileescline= line("$")
put ='let g:netrw_tmpfile_escape...'
put = 'let g:netrw_use_noswf = '.g:netrw_use_noswf
put = 'let g:netrw_xstrlen = '.g:netrw_xstrlen
put = 'let g:netrw_winsize = '.g:netrw_winsize
put =''
@@ -142,13 +156,10 @@ fun! netrwSettings#NetrwSettings()
silent %s/= $/= ''/e
1
" Put in shq setting.
" (deferred so as to avoid the quote manipulation just preceding)
if g:netrw_shq == "'"
call setline(shqline,'let g:netrw_shq = "'.g:netrw_shq.'"')
else
call setline(shqline,"let g:netrw_shq = '".g:netrw_shq."'")
endif
call setline(decompressline,"let g:netrw_decompress = ".substitute(string(g:netrw_decompress),"^'\\(.*\\)'$",'\1',''))
call setline(fnameescline, "let g:netrw_fname_escape = '".escape(g:netrw_fname_escape,"'")."'")
call setline(globescline, "let g:netrw_glob_escape = '".escape(g:netrw_glob_escape,"'")."'")
call setline(tmpfileescline,"let g:netrw_tmpfile_escape = '".escape(g:netrw_tmpfile_escape,"'")."'")
set nomod
+8 -8
View File
@@ -36,7 +36,7 @@ if !exists("g:rubycomplete_classes_in_global")
endif
if !exists("g:rubycomplete_buffer_loading")
let g:rubycomplete_classes_in_global = 0
let g:rubycomplete_buffer_loading = 0
endif
if !exists("g:rubycomplete_include_object")
@@ -301,7 +301,7 @@ class VimRubyCompletion
def get_buffer_entity(name, vimfun)
loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading")
return nil if loading_allowed != '1'
return nil if loading_allowed.to_i.zero?
return nil if /(\"|\')+/.match( name )
buf = VIM::Buffer.current
nums = eval( VIM::evaluate( vimfun % name ) )
@@ -368,7 +368,7 @@ class VimRubyCompletion
# this will be a little expensive.
loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading")
allow_aggressive_load = VIM::evaluate("exists('g:rubycomplete_classes_in_global') && g:rubycomplete_classes_in_global")
return [] if allow_aggressive_load != '1' || loading_allowed != '1'
return [] if allow_aggressive_load.to_i.zero? || loading_allowed.to_i.zero?
buf = VIM::Buffer.current
eob = buf.length
@@ -401,7 +401,7 @@ class VimRubyCompletion
def load_rails
allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails")
return if allow_rails != '1'
return if allow_rails.to_i.zero?
buf_path = VIM::evaluate('expand("%:p")')
file_name = VIM::evaluate('expand("%:t")')
@@ -461,7 +461,7 @@ class VimRubyCompletion
def get_rails_helpers
allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails")
rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded')
return [] if allow_rails != '1' || rails_loaded != '1'
return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero?
buf_path = VIM::evaluate('expand("%:p")')
buf_path.gsub!( /\\/, "/" )
@@ -511,7 +511,7 @@ class VimRubyCompletion
def add_rails_columns( cls )
allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails")
rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded')
return [] if allow_rails != '1' || rails_loaded != '1'
return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero?
begin
eval( "#{cls}.establish_connection" )
@@ -534,7 +534,7 @@ class VimRubyCompletion
def get_rails_view_methods
allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails")
rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded')
return [] if allow_rails != '1' || rails_loaded != '1'
return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero?
buf_path = VIM::evaluate('expand("%:p")')
buf_path.gsub!( /\\/, "/" )
@@ -580,7 +580,7 @@ class VimRubyCompletion
def get_completions(base)
loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading")
if loading_allowed == '1'
if loading_allowed.to_i == 1
load_requires
load_rails
end
+15 -4
View File
@@ -1,9 +1,15 @@
" Vim script to download a missing spell file
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2007 May 08
" Last Change: 2008 Jun 27
if !exists('g:spellfile_URL')
let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell'
" Prefer using http:// when netrw should be able to use it, since
" more firewalls let this through.
if executable("curl") || executable("wget") || executable("fetch")
let g:spellfile_URL = 'http://ftp.vim.org/pub/vim/runtime/spell'
else
let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell'
endif
endif
let s:spellfile_URL = '' " Start with nothing so that s:donedict is reset.
@@ -106,7 +112,12 @@ function! spellfile#LoadFile(lang)
endfor
let dirchoice = confirm(msg, dirchoices) - 2
if dirchoice >= 0
exe "write " . escape(dirlist[dirchoice], ' ') . '/' . fname
if exists('*fnameescape')
let dirname = fnameescape(dirlist[dirchoice])
else
let dirname = escape(dirlist[dirchoice], ' ')
endif
exe "write " . dirname . '/' . fname
" Also download the .sug file, if the user wants to.
let msg = "Do you want me to try getting the .sug file?\n"
@@ -119,7 +130,7 @@ function! spellfile#LoadFile(lang)
call spellfile#Nread(fname)
if getline(2) =~ 'VIMsug'
1d
exe "write " . escape(dirlist[dirchoice], ' ') . '/' . fname
exe "write " . dirname . '/' . fname
set nomod
else
echo 'Sorry, downloading failed'
+37 -35
View File
@@ -1,8 +1,8 @@
" Vim OMNI completion script for SQL
" Language: SQL
" Maintainer: David Fishburn <fishburn@ianywhere.com>
" Version: 5.0
" Last Change: Mon Jun 05 2006 3:30:04 PM
" Version: 6.0
" Last Change: Thu 03 Apr 2008 10:37:54 PM Eastern Daylight Time
" Usage: For detailed help
" ":help sql.txt"
" or ":help ft-sql-omni"
@@ -106,7 +106,7 @@ function! sqlcomplete#Complete(findstart, base)
let begindot = 1
endif
while start > 0
if line[start - 1] =~ '\w'
if line[start - 1] =~ '\(\w\|\s\+\)'
let start -= 1
elseif line[start - 1] =~ '\.' &&
\ compl_type =~ 'column\|table\|view\|procedure'
@@ -178,11 +178,10 @@ function! sqlcomplete#Complete(findstart, base)
" Allow the user to override the dbext plugin to specify whether
" the owner/creator should be included in the list
let saved_dbext_show_owner = 1
if exists('g:dbext_default_dict_show_owner')
let saved_dbext_show_owner = g:dbext_default_dict_show_owner
if g:loaded_dbext >= 300
let saveSetting = DB_listOption('dict_show_owner')
exec 'DBSetOption dict_show_owner='.(g:omni_sql_include_owner==1?'1':'0')
endif
let g:dbext_default_dict_show_owner = g:omni_sql_include_owner
let compl_type_uc = substitute(compl_type, '\w\+', '\u&', '')
if s:sql_file_{compl_type} == ""
@@ -192,18 +191,12 @@ function! sqlcomplete#Complete(findstart, base)
if s:sql_file_{compl_type} != ""
if filereadable(s:sql_file_{compl_type})
let compl_list = readfile(s:sql_file_{compl_type})
" let dic_list = readfile(s:sql_file_{compl_type})
" if !empty(dic_list)
" for elem in dic_list
" let kind = (compl_type=='table'?'m':(compl_type=='procedure'?'f':'v'))
" let item = {'word':elem, 'menu':elem, 'kind':kind, 'info':compl_type}
" let compl_list += [item]
" endfor
" endif
endif
endif
let g:dbext_default_dict_show_owner = saved_dbext_show_owner
if g:loaded_dbext > 300
exec 'DBSetOption dict_show_owner='.saveSetting
endif
elseif compl_type =~? 'column'
" This type of completion relies upon the dbext.vim plugin
@@ -450,8 +443,8 @@ function! s:SQLCCheck4dbext()
" Leave time for the user to read the error message
:sleep 2
return -1
elseif g:loaded_dbext < 300
let msg = "The dbext plugin must be at least version 3.00 " .
elseif g:loaded_dbext < 600
let msg = "The dbext plugin must be at least version 5.30 " .
\ " for dynamic SQL completion"
call s:SQLCErrorMsg(msg)
" Leave time for the user to read the error message
@@ -514,34 +507,42 @@ endfunction
function! s:SQLCGetObjectOwner(object)
" The owner regex matches a word at the start of the string which is
" followed by a dot, but doesn't include the dot in the result.
" ^ - from beginning of line
" "\? - ignore any quotes
" \zs - start the match now
" \w\+ - get owner name
" \ze - end the match
" "\? - ignore any quotes
" \. - must by followed by a .
let owner = matchstr( a:object, '^"\?\zs\w\+\ze"\?\.' )
" ^ - from beginning of line
" \("\|\[\)\? - ignore any quotes
" \zs - start the match now
" .\{-} - get owner name
" \ze - end the match
" \("\|\[\)\? - ignore any quotes
" \. - must by followed by a .
" let owner = matchstr( a:object, '^\s*\zs.*\ze\.' )
let owner = matchstr( a:object, '^\("\|\[\)\?\zs\.\{-}\ze\("\|\]\)\?\.' )
return owner
endfunction
function! s:SQLCGetColumns(table_name, list_type)
" Check if the table name was provided as part of the column name
let table_name = matchstr(a:table_name, '^[a-zA-Z0-9_]\+\ze\.\?')
let table_name = matchstr(a:table_name, '^["\[\]a-zA-Z0-9_ ]\+\ze\.\?')
let table_cols = []
let table_alias = ''
let move_to_top = 1
let table_name = substitute(table_name, '\s*\(.\{-}\)\s*$', '\1', 'g')
" If the table name was given as:
" where c.
let table_name = substitute(table_name, '^\c\(WHERE\|AND\|OR\)\s\+', '', '')
if g:loaded_dbext >= 300
let saveSettingAlias = DB_listOption('use_tbl_alias')
exec 'DBSetOption use_tbl_alias=n'
endif
let table_name_stripped = substitute(table_name, '["\[\]]*', '', 'g')
" Check if we have already cached the column list for this table
" by its name
let list_idx = index(s:tbl_name, table_name, 0, &ignorecase)
let list_idx = index(s:tbl_name, table_name_stripped, 0, &ignorecase)
if list_idx > -1
let table_cols = split(s:tbl_cols[list_idx])
let table_cols = split(s:tbl_cols[list_idx], '\n')
else
" Check if we have already cached the column list for this table
" by its alias, assuming the table_name provided was actually
@@ -549,11 +550,11 @@ function! s:SQLCGetColumns(table_name, list_type)
" select *
" from area a
" where a.
let list_idx = index(s:tbl_alias, table_name, 0, &ignorecase)
let list_idx = index(s:tbl_alias, table_name_stripped, 0, &ignorecase)
if list_idx > -1
let table_alias = table_name
let table_alias = table_name_stripped
let table_name = s:tbl_name[list_idx]
let table_cols = split(s:tbl_cols[list_idx])
let table_cols = split(s:tbl_cols[list_idx], '\n')
endif
endif
@@ -609,8 +610,8 @@ function! s:SQLCGetColumns(table_name, list_type)
" '.*' - Exclude the rest of the line in the match
let table_name_new = matchstr(@y,
\ 'from.\{-}'.
\ '\zs\(\(\<\w\+\>\)\.\)\?'.
\ '\<\w\+\>\ze'.
\ '\zs\(\("\|\[\)\?.\{-}\("\|\]\)\.\)\?'.
\ '\("\|\[\)\?.\{-}\("\|\]\)\ze'.
\ '\s\+\%(as\s\+\)\?\<'.
\ matchstr(table_name, '.\{-}\ze\.\?$').
\ '\>'.
@@ -618,6 +619,7 @@ function! s:SQLCGetColumns(table_name, list_type)
\ '\(\<where\>\|$\)'.
\ '.*'
\ )
if table_name_new != ''
let table_alias = table_name
let table_name = table_name_new
@@ -668,7 +670,7 @@ function! s:SQLCGetColumns(table_name, list_type)
let s:tbl_name = add( s:tbl_name, table_name )
let s:tbl_alias = add( s:tbl_alias, table_alias )
let s:tbl_cols = add( s:tbl_cols, table_cols_str )
let table_cols = split(table_cols_str)
let table_cols = split(table_cols_str, '\n')
endif
endif
+8 -6
View File
@@ -1,8 +1,8 @@
" Vim completion script
" Language: All languages, uses existing syntax highlighting rules
" Maintainer: David Fishburn <fishburn@ianywhere.com>
" Version: 3.0
" Last Change: Wed Nov 08 2006 10:46:46 AM
" Maintainer: David Fishburn <dfishburn.vim@gmail.com>
" Version: 4.0
" Last Change: Fri 26 Oct 2007 05:27:03 PM Eastern Daylight Time
" Usage: For detailed help, ":help ft-syntax-omni"
" Set completion with CTRL-X CTRL-O to autoloaded function.
@@ -19,7 +19,7 @@ endif
if exists('g:loaded_syntax_completion')
finish
endif
let g:loaded_syntax_completion = 30
let g:loaded_syntax_completion = 40
" Set ignorecase to the ftplugin standard
" This is the default setting, but if you define a buffer local
@@ -353,9 +353,11 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
else
let accept_chars = ','.&iskeyword.','
" Remove all character ranges
let accept_chars = substitute(accept_chars, ',[^,]\+-[^,]\+,', ',', 'g')
" let accept_chars = substitute(accept_chars, ',[^,]\+-[^,]\+,', ',', 'g')
let accept_chars = substitute(accept_chars, ',\@<=[^,]\+-[^,]\+,', '', 'g')
" Remove all numeric specifications
let accept_chars = substitute(accept_chars, ',\d\{-},', ',', 'g')
" let accept_chars = substitute(accept_chars, ',\d\{-},', ',', 'g')
let accept_chars = substitute(accept_chars, ',\@<=\d\{-},', '', 'g')
" Remove all commas
let accept_chars = substitute(accept_chars, ',', '', 'g')
" Escape special regex characters
+174 -64
View File
@@ -1,21 +1,21 @@
" tar.vim: Handles browsing tarfiles
" AUTOLOAD PORTION
" Date: Sep 29, 2006
" Version: 11
" Date: Aug 08, 2008
" Version: 23 + modifications by Bram
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" License: Vim License (see vim's :help license)
"
" Contains many ideas from Michael Toren's <tar.vim>
"
" Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
" Copyright: Copyright (C) 2005-2008 Charles E. Campbell, Jr. {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
" notice is copied with it. Like anything else that's free,
" tarPlugin.vim is provided *as is* and comes with no warranty
" of any kind, either expressed or implied. By using this
" plugin, you agree that in no event will the copyright
" holder be liable for any damages resulting from the use
" of this software.
" tar.vim and tarPlugin.vim are provided *as is* and comes
" with no warranty of any kind, either expressed or implied.
" By using this plugin, you agree that in no event will the
" copyright holder be liable for any damages resulting from
" the use of this software.
" ---------------------------------------------------------------------
" Load Once: {{{1
@@ -24,8 +24,11 @@ set cpo&vim
if &cp || exists("g:loaded_tar") || v:version < 700
finish
endif
let g:loaded_tar= "v11"
let g:loaded_tar= "v23b"
"call Decho("loading autoload/tar.vim")
if v:version < 701 || (v:version == 701 && !has("patch299"))
echoerr "(autoload/tar.vim) need vim v7.1 with patchlevel 299"
endif
" ---------------------------------------------------------------------
" Default Settings: {{{1
@@ -41,14 +44,35 @@ endif
if !exists("g:tar_writeoptions")
let g:tar_writeoptions= "uf"
endif
if !exists("g:tar_shq")
if has("unix")
let g:tar_shq= "'"
if !exists("g:netrw_cygwin")
if has("win32") || has("win95") || has("win64") || has("win16")
if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
let g:netrw_cygwin= 1
else
let g:netrw_cygwin= 0
endif
else
let g:tar_shq= '"'
let g:netrw_cygwin= 0
endif
endif
" set up shell quoting character
if !exists("g:tar_shq")
if exists("&shq") && &shq != ""
let g:tar_shq= &shq
elseif has("win32") || has("win95") || has("win64") || has("win16")
if exists("g:netrw_cygwin") && g:netrw_cygwin
let g:tar_shq= "'"
else
let g:tar_shq= '"'
endif
else
let g:tar_shq= "'"
endif
" call Decho("g:tar_shq<".g:tar_shq.">")
endif
" ----------------
" Functions: {{{1
" ----------------
@@ -95,27 +119,36 @@ fun! tar#Browse(tarfile)
" give header
" call Decho("printing header")
exe "$put ='".'\"'." tar.vim version ".g:loaded_tar."'"
exe "$put ='".'\"'." Browsing tarfile ".a:tarfile."'"
exe "$put ='".'\"'." Select a file with cursor and press ENTER"."'"
let lastline= line("$")
call setline(lastline+1,'" tar.vim version '.g:loaded_tar)
call setline(lastline+2,'" Browsing tarfile '.a:tarfile)
call setline(lastline+3,'" Select a file with cursor and press ENTER')
$put =''
0d
$
let tarfile= a:tarfile
if has("win32") && executable("cygpath")
" assuming cygwin
let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
let tarfile=substitute(system("cygpath -u ".s:Escape(tarfile,0)),'\n$','','e')
endif
let curlast= line("$")
if tarfile =~# '\.\(gz\|tgz\)$'
" call Decho("exe silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - "
" call Decho("1: exe silent r! gzip -d -c -- ".s:Escape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "silent r! gzip -d -c -- ".s:Escape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.lrp'
" call Decho("2: exe silent r! cat -- ".s:Escape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "silent r! cat -- ".s:Escape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.bz2$'
" call Decho("exe silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - "
" call Decho("3: exe silent r! bzip2 -d -c -- ".s:Escape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "silent r! bzip2 -d -c -- ".s:Escape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
else
" call Decho("exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".g:tar_shq.tarfile.g:tar_shq)
exe "silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".g:tar_shq.tarfile.g:tar_shq
if tarfile =~ '^\s*-'
" A file name starting with a dash may be taken as an option. Prepend ./ to avoid that.
let tarfile = substitute(tarfile, '-', './-', '')
endif
" call Decho("4: exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".s:Escape(tarfile,1))
exe "silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".s:Escape(tarfile,1)
endif
if v:shell_error != 0
redraw!
@@ -131,7 +164,7 @@ fun! tar#Browse(tarfile)
silent %d
let eikeep= &ei
set ei=BufReadCmd,FileReadCmd
exe "r ".a:tarfile
exe "r ".fnameescape(a:tarfile)
let &ei= eikeep
1d
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
@@ -154,6 +187,13 @@ fun! s:TarBrowseSelect()
let fname= getline(".")
" call Decho("fname<".fname.">")
if !exists("g:tar_secure") && fname =~ '^\s*-\|\s\+-'
redraw!
echohl WarningMsg | echo '***error*** (tar#BrowseSelect) rejecting tarfile member<'.fname.'> because of embedded "-"; See :help tar-options'
" call Dret('tar#BrowseSelect : rejecting tarfile member<'.fname.'> because of embedded "-"')
return
endif
" sanity check
if fname =~ '^"'
let &report= repkeep
@@ -166,13 +206,15 @@ fun! s:TarBrowseSelect()
let curfile= expand("%")
if has("win32") && executable("cygpath")
" assuming cygwin
let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
let tarfile=substitute(system("cygpath -u ".s:Escape(tarfile,0)),'\n$','','e')
endif
new
wincmd _
if !exists("g:tar_nomax") || g:tar_nomax == 0
wincmd _
endif
let s:tblfile_{winnr()}= curfile
call tar#Read("tarfile:".tarfile.':'.fname,1)
call tar#Read("tarfile:".tarfile.'::'.fname,1)
filetype detect
let &report= repkeep
@@ -185,27 +227,59 @@ fun! tar#Read(fname,mode)
" call Dfunc("tar#Read(fname<".a:fname.">,mode=".a:mode.")")
let repkeep= &report
set report=10
let tarfile = substitute(a:fname,'tarfile:\(.\{-}\):.*$','\1','')
let fname = substitute(a:fname,'tarfile:.\{-}:\(.*\)$','\1','')
let tarfile = substitute(a:fname,'tarfile:\(.\{-}\)::.*$','\1','')
let fname = substitute(a:fname,'tarfile:.\{-}::\(.*\)$','\1','')
if has("win32") && executable("cygpath")
" assuming cygwin
let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
let tarfile=substitute(system("cygpath -u ".s:Escape(tarfile,0)),'\n$','','e')
endif
" call Decho("tarfile<".tarfile.">")
" call Decho("fname<".fname.">")
if tarfile =~# '\.\(gz\|tgz\)$'
" call Decho("exe silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -OPxf - '".fname."'")
exe "silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_readoptions." - '".fname."'"
elseif tarfile =~# '\.bz2$'
" call Decho("exe silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_readoptions." - '".fname."'")
exe "silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_readoptions." - '".fname."'"
if fname =~ '\.gz$' && executable("zcat")
let decmp= "|zcat"
let doro = 1
elseif fname =~ '\.bz2$' && executable("bzcat")
let decmp= "|bzcat"
let doro = 1
else
" call Decho("exe silent r! ".g:tar_cmd." -".g:tar_readoptions." ".g:tar_shq.tarfile.g:tar_shq." ".g:tar_shq.fname.g:tar_shq)
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions." ".g:tar_shq.tarfile.g:tar_shq." ".g:tar_shq.fname.g:tar_shq
let decmp=""
let doro = 0
if fname =~ '\.gz$\|\.bz2$\|\.Z$\|\.zip$'
setlocal bin
endif
endif
if exists("g:tar_secure")
let tar_secure= " -- "
else
let tar_secure= " "
endif
if tarfile =~# '\.\(gz\|tgz\)$'
" call Decho("5: exe silent r! gzip -d -c -- ".s:Escape(tarfile,1)."| ".g:tar_cmd.' -'.g:tar_readoptions.' - '.tar_secure.s:Escape(fname,1))
exe "silent r! gzip -d -c -- ".s:Escape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.s:Escape(fname,1).decmp
elseif tarfile =~# '\.lrp$'
" call Decho("6: exe silent r! cat ".s:Escape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.s:Escape(fname,1).decmp)
exe "silent r! cat -- ".s:Escape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.s:Escape(fname,1).decmp
elseif tarfile =~# '\.bz2$'
" call Decho("7: exe silent r! bzip2 -d -c ".s:Escape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.s:Escape(fname,1).decmp)
exe "silent r! bzip2 -d -c -- ".s:Escape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.s:Escape(fname,1).decmp
else
if tarfile =~ '^\s*-'
" A file name starting with a dash may be taken as an option. Prepend ./ to avoid that.
let tarfile = substitute(tarfile, '-', './-', '')
endif
" call Decho("8: exe silent r! ".g:tar_cmd." -".g:tar_readoptions." "s:Escape(tarfile,1).tar_secure..s:Escape(fname,1).decmp)
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions." ".s:Escape(tarfile,1).tar_secure.s:Escape(fname,1).decmp
endif
if doro
" because the reverse process of compressing changed files back into the tarball is not currently supported
setlocal ro
endif
let w:tarfile= a:fname
exe "file tarfile:".fname
exe "file tarfile::".fnameescape(fname)
" cleanup
0d
@@ -222,6 +296,13 @@ fun! tar#Write(fname)
let repkeep= &report
set report=10
if !exists("g:tar_secure") && a:fname =~ '^\s*-\|\s\+-'
redraw!
echohl WarningMsg | echo '***error*** (tar#Write) rejecting tarfile member<'.a:fname.'> because of embedded "-"; See :help tar-options'
" call Dret('tar#Write : rejecting tarfile member<'.fname.'> because of embedded "-"')
return
endif
" sanity checks
if !executable(g:tar_cmd)
redraw!
@@ -251,7 +332,7 @@ fun! tar#Write(fname)
" attempt to change to the indicated directory
try
exe "cd ".escape(tmpdir,' \')
exe "cd ".fnameescape(tmpdir)
catch /^Vim\%((\a\+)\)\=:E344/
redraw!
echohl Error | echo "***error*** (tar#Write) cannot cd to temporary directory" | Echohl None
@@ -270,24 +351,28 @@ fun! tar#Write(fname)
cd _ZIPVIM_
" call Decho("current directory now: ".getcwd())
let tarfile = substitute(w:tarfile,'tarfile:\(.\{-}\):.*$','\1','')
let fname = substitute(w:tarfile,'tarfile:.\{-}:\(.*\)$','\1','')
let tarfile = substitute(w:tarfile,'tarfile:\(.\{-}\)::.*$','\1','')
let fname = substitute(w:tarfile,'tarfile:.\{-}::\(.*\)$','\1','')
" handle compressed archives
if tarfile =~# '\.gz'
call system("gzip -d ".tarfile)
call system("gzip -d -- ".s:Escape(tarfile,0))
let tarfile = substitute(tarfile,'\.gz','','e')
let compress= "gzip '".tarfile."'"
let compress= "gzip -- ".s:Escape(tarfile,0)
" call Decho("compress<".compress.">")
elseif tarfile =~# '\.tgz'
call system("gzip -d ".tarfile)
call system("gzip -d -- ".s:Escape(tarfile,0))
let tarfile = substitute(tarfile,'\.tgz','.tar','e')
let compress= "gzip '".tarfile."'"
let compress= "gzip -- ".s:Escape(tarfile,0)
let tgz = 1
" call Decho("compress<".compress.">")
elseif tarfile =~# '\.bz2'
call system("bzip2 -d ".tarfile)
call system("bzip2 -d -- ".s:Escape(tarfile,0))
let tarfile = substitute(tarfile,'\.bz2','','e')
let compress= "bzip2 '".tarfile."'"
let compress= "bzip2 -- ".s:Escape(tarfile,0)
" call Decho("compress<".compress.">")
endif
" call Decho("tarfile<".tarfile.">")
if v:shell_error != 0
redraw!
@@ -300,35 +385,44 @@ fun! tar#Write(fname)
if fname =~ '/'
let dirpath = substitute(fname,'/[^/]\+$','','e')
if executable("cygpath")
let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
let dirpath = substitute(system("cygpath ".s:Escape(dirpath, 0)),'\n','','e')
endif
call mkdir(dirpath,"p")
endif
if tarfile !~ '/'
let tarfile= curdir.'/'.tarfile
endif
if tarfile =~ '^\s*-'
" A file name starting with a dash may be taken as an option. Prepend ./ to avoid that.
let tarfile = substitute(tarfile, '-', './-', '')
endif
" call Decho("tarfile<".tarfile."> fname<".fname.">")
exe "w! ".fname
if exists("g:tar_secure")
let tar_secure= " -- "
else
let tar_secure= " "
endif
exe "w! ".fnameescape(fname)
if executable("cygpath")
let tarfile = substitute(system("cygpath ".tarfile),'\n','','e')
let tarfile = substitute(system("cygpath ".s:Escape(tarfile,0)),'\n','','e')
endif
" delete old file from tarfile
" call Decho("tar --delete -f '".tarfile."' '".fname."'")
call system("tar --delete -f '".tarfile."' '".fname."'")
" call Decho("system(".g:tar_cmd." --delete -f ".s:Escape(tarfile,0)." -- ".s:Escape(fname,0).")")
call system(g:tar_cmd." --delete -f ".s:Escape(tarfile,0).tar_secure.s:Escape(fname,0))
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
else
" update tarfile with new file
" call Decho("tar -".g:tar_writeoptions." '".tarfile."' '".fname."'")
call system("tar -".g:tar_writeoptions." '".tarfile."' '".fname."'")
" call Decho(g:tar_cmd." -".g:tar_writeoptions." ".s:Escape(tarfile,0).tar_secure.s:Escape(fname,0))
call system(g:tar_cmd." -".g:tar_writeoptions." ".s:Escape(tarfile,0).tar_secure.s:Escape(fname,0))
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
elseif exists("compress")
" call Decho("call system(".compress.")")
@@ -348,7 +442,7 @@ fun! tar#Write(fname)
let binkeep= &binary
let eikeep = &ei
set binary ei=all
exe "e! ".tarfile
exe "e! ".fnameescape(tarfile)
call netrw#NetWrite(tblfile)
let &ei = eikeep
let &binary = binkeep
@@ -360,7 +454,7 @@ fun! tar#Write(fname)
" cleanup and restore current directory
cd ..
call s:Rmdir("_ZIPVIM_")
exe "cd ".escape(curdir,' \')
exe "cd ".fnameescape(curdir)
setlocal nomod
let &report= repkeep
@@ -372,19 +466,35 @@ endfun
fun! s:Rmdir(fname)
" call Dfunc("Rmdir(fname<".a:fname.">)")
if has("unix")
call system("/bin/rm -rf ".a:fname)
call system("/bin/rm -rf -- ".s:Escape(a:fname,0))
elseif has("win32") || has("win95") || has("win64") || has("win16")
if &shell =~? "sh$"
call system("/bin/rm -rf ".a:fname)
call system("/bin/rm -rf -- ".s:Escape(a:fname,0))
else
call system("del /S ".a:fname)
call system("del /S ".s:Escape(a:fname,0))
endif
endif
" call Dret("Rmdir")
endfun
" ------------------------------------------------------------------------
" ---------------------------------------------------------------------
" s:Escape: {{{2
fun s:Escape(name,isfilt)
" shellescape() was added by patch 7.0.111
if exists("*shellescape")
if a:isfilt
let qnameq= shellescape(a:name,1)
else
let qnameq= shellescape(a:name)
endif
else
let qnameq= g:tar_shq . a:name . g:tar_shq
endif
return qnameq
endfun
" ---------------------------------------------------------------------
" Modelines And Restoration: {{{1
let &cpo= s:keepcpo
unlet s:keepcpo
" vim:ts=8 fdm=marker
" vim:ts=8 fdm=marker
+247 -115
View File
@@ -1,9 +1,9 @@
" vimball.vim : construct a file containing both paths and files
" Author: Charles E. Campbell, Jr.
" Date: May 07, 2007
" Version: 22
" Date: Jul 30, 2008
" Version: 29
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
" Copyright: (c) 2004-2006 by Charles E. Campbell, Jr.
" Copyright: (c) 2004-2008 by Charles E. Campbell, Jr.
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
" (see |copyright|) except use "Vimball" instead of "Vim".
" No warranty, express or implied.
@@ -15,8 +15,9 @@ if &cp || exists("g:loaded_vimball") || v:version < 700
finish
endif
let s:keepcpo = &cpo
let g:loaded_vimball = "v22"
let g:loaded_vimball = "v29"
set cpo&vim
"DechoTabOn
" =====================================================================
" Constants: {{{1
@@ -24,6 +25,57 @@ if !exists("s:USAGE")
let s:USAGE = 0
let s:WARNING = 1
let s:ERROR = 2
" determine if cygwin is in use or not
if !exists("g:netrw_cygwin")
if has("win32") || has("win95") || has("win64") || has("win16")
if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
let g:netrw_cygwin= 1
else
let g:netrw_cygwin= 0
endif
else
let g:netrw_cygwin= 0
endif
endif
" set up g:vimball_mkdir if the mkdir() call isn't defined
if !exists("*mkdir")
if exists("g:netrw_local_mkdir")
let g:vimball_mkdir= g:netrw_local_mkdir
elseif executable("mkdir")
let g:vimball_mkdir= "mkdir"
elseif executable("makedir")
let g:vimball_mkdir= "makedir"
endif
if !exists(g:vimball_mkdir)
call vimball#ShowMesg(s:WARNING,"(vimball) g:vimball_mkdir undefined")
endif
endif
" set up shell quoting character
if exists("g:vimball_shq") && !exists("g:netrw_shq")
let g:netrw_shq= g:vimball_shq
endif
if !exists("g:netrw_shq")
if exists("&shq") && &shq != ""
let g:netrw_shq= &shq
elseif has("win32") || has("win95") || has("win64") || has("win16")
if g:netrw_cygwin
let g:netrw_shq= "'"
else
let g:netrw_shq= '"'
endif
else
let g:netrw_shq= "'"
endif
" call Decho("g:netrw_shq<".g:netrw_shq.">")
endif
" set up escape string (used to protect paths)
if !exists("g:vimball_path_escape")
let g:vimball_path_escape= ' ;#%'
endif
endif
" =====================================================================
@@ -31,7 +83,12 @@ endif
" ---------------------------------------------------------------------
" vimball#MkVimball: creates a vimball given a list of paths to files {{{2
" Vimball Format:
" Input:
" line1,line2: a range of lines containing paths to files to be included in the vimball
" writelevel : if true, force a write to filename.vba, even if it exists
" (usually accomplished with :MkVimball! ...
" filename : base name of file to be created (ie. filename.vba)
" Output: a filename.vba using vimball format:
" path
" filesize
" [file]
@@ -40,7 +97,7 @@ endif
" [file]
fun! vimball#MkVimball(line1,line2,writelevel,...) range
" call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:1.">) a:0=".a:0)
if a:1 =~ '.vim' || a:1 =~ '.txt'
if a:1 =~ '\.vim$' || a:1 =~ '\.txt$'
let vbname= substitute(a:1,'\.\a\{3}$','.vba','')
else
let vbname= a:1
@@ -61,7 +118,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
endif
" user option bypass
call s:SaveSettings()
call vimball#SaveSettings()
if a:0 >= 2
" allow user to specify where to get the files
@@ -87,7 +144,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
if !filereadable(svfile)
call vimball#ShowMesg(s:ERROR,"unable to read file<".svfile.">")
call s:ChgDir(curdir)
call s:RestoreSettings()
call vimball#RestoreSettings()
" call Dret("MkVimball")
return
endif
@@ -112,9 +169,8 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
call setline(lastline+1,0)
" write the file from the tab
let svfilepath= s:Path(svfile,'')
" call Decho("exe $r ".svfilepath)
exe "$r ".svfilepath
" call Decho("exe $r ".fnameescape(svfile))
exe "$r ".fnameescape(svfile)
call setline(lastline+1,line("$") - lastline - 1)
" call Decho("lastline=".lastline." line$=".line("$"))
@@ -127,14 +183,13 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
" write the vimball
exe "tabn ".vbtabnr
call s:ChgDir(curdir)
setlocal ff=unix
if a:writelevel
let vbnamepath= s:Path(vbname,'')
" call Decho("exe w! ".vbnamepath)
exe "w! ".vbnamepath
" call Decho("exe w! ".fnameescape(vbname))
exe "w! ".fnameescape(vbname)
else
let vbnamepath= s:Path(vbname,'')
" call Decho("exe w ".vbnamepath)
exe "w ".vbnamepath
" call Decho("exe w ".fnameescape(vbname))
exe "w ".fnameescape(vbname)
endif
" call Decho("Vimball<".vbname."> created")
echo "Vimball<".vbname."> created"
@@ -145,16 +200,24 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
exe "tabc ".vbtabnr
" restore options
call s:RestoreSettings()
call vimball#RestoreSettings()
" call Dret("MkVimball")
endfun
" ---------------------------------------------------------------------
" vimball#Vimball: extract and distribute contents from a vimball {{{2
" (invoked the the UseVimball command embedded in
" vimballs' prologue)
fun! vimball#Vimball(really,...)
" call Dfunc("vimball#Vimball(really=".a:really.") a:0=".a:0)
if v:version < 701 || (v:version == 701 && !exists('*fnameescape'))
echoerr "your vim is missing the fnameescape() function"
" call Dret("vimball#Vimball : needs 7.1 with patch 299")
return
endif
if getline(1) !~ '^" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.$'
echoerr "(Vimball) The current file does not appear to be a Vimball!"
" call Dret("vimball#Vimball")
@@ -162,8 +225,9 @@ fun! vimball#Vimball(really,...)
endif
" set up standard settings
call s:SaveSettings()
let curtabnr = tabpagenr()
call vimball#SaveSettings()
let curtabnr = tabpagenr()
let vimballfile = expand("%:tr")
" set up vimball tab
" call Decho("setting up vimball tab")
@@ -186,16 +250,18 @@ fun! vimball#Vimball(really,...)
" call Decho("curdir<".curdir.">")
call s:ChgDir(home)
call vimball#RmVimball()
let s:ok_unablefind= 1
call vimball#RmVimball(vimballfile)
unlet s:ok_unablefind
let linenr = 4
let filecnt = 0
" give title to listing of (extracted) files from Vimball Archive
if a:really
echohl Title | echomsg "Vimball Archive" | echohl None
else
echohl Title | echomsg "Vimball Archive Listing" | echohl None
echohl Title | echomsg "Vimball Archive" | echohl None
else
echohl Title | echomsg "Vimball Archive Listing" | echohl None
echohl Statement | echomsg "files would be placed under: ".home | echohl None
endif
@@ -206,7 +272,7 @@ fun! vimball#Vimball(really,...)
while 1 < linenr && linenr < line("$")
let fname = substitute(getline(linenr),'\t\[\[\[1$','','')
let fname = substitute(fname,'\\','/','g')
let fsize = getline(linenr+1)
let fsize = getline(linenr+1)+0
let filecnt = filecnt + 1
" call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt)
@@ -219,10 +285,10 @@ fun! vimball#Vimball(really,...)
" call Decho("using L#".(linenr+1).": fsize=".fsize)
" Allow AsNeeded/ directory to take place of plugin/ directory
" when AsNeeded/filename is filereadable
" when AsNeeded/filename is filereadable or was present in VimballRecord
if fname =~ '\<plugin/'
let anfname= substitute(fname,'\<plugin/','AsNeeded/','')
if filereadable(anfname)
if filereadable(anfname) || (exists("s:VBRstring") && s:VBRstring =~ anfname)
" call Decho("using anfname<".anfname."> instead of <".fname.">")
let fname= anfname
endif
@@ -240,7 +306,11 @@ fun! vimball#Vimball(really,...)
" call Decho("dirname<".dirname.">")
if !isdirectory(dirname)
" call Decho("making <".dirname.">")
call mkdir(dirname)
if exists("g:vimball_mkdir")
call system(g:vimball_mkdir." ".s:Escape(dirname))
else
call mkdir(dirname)
endif
call s:RecordInVar(home,"rmdir('".dirname."')")
endif
endwhile
@@ -257,6 +327,7 @@ fun! vimball#Vimball(really,...)
" copy "a" buffer into tab
" call Decho('copy "a buffer into tab#'.vbtabnr)
exe "tabn ".vbtabnr
setlocal ma
silent! %d
silent put a
1
@@ -264,11 +335,11 @@ fun! vimball#Vimball(really,...)
" write tab to file
if a:really
let fnamepath= s:Path(home."/".fname,'')
" call Decho("exe w! ".fnamepath)
exe "silent w! ".fnamepath
let fnamepath= home."/".fname
" call Decho("exe w! ".fnameescape(fnamepath))
exe "silent w! ".fnameescape(fnamepath)
echo "wrote ".fnamepath
call s:RecordInVar(home,"call delete('".fnamepath."')")
call s:RecordInVar(home,"call delete('".fnameescape(fnamepath)."')")
endif
" return to tab with vimball
@@ -277,23 +348,22 @@ fun! vimball#Vimball(really,...)
" set up help if its a doc/*.txt file
" call Decho("didhelp<".didhelp."> fname<".fname.">")
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.txt$'
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.txt$','\1','')
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.\(txt\|..x\)$'
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.\(txt\|..x\)$','\1','')
" call Decho("didhelp<".didhelp.">")
endif
" update for next file
" let oldlinenr = linenr " Decho
let linenr = linenr + fsize
" call Decho("update linenr= [linenr=".oldlinenr."] + [fsize=".fsize."] = ".linenr)
" call Decho("update linenr= [linenr=".linenr."] + [fsize=".fsize."] = ".(linenr+fsize))
let linenr= linenr + fsize
endwhile
" set up help
" call Decho("about to set up help: didhelp<".didhelp.">")
if didhelp != ""
let htpath= escape(substitute(s:Path(home."/".didhelp,'"'),'"','','g'),' ')
let htpath= home."/".didhelp
" call Decho("exe helptags ".htpath)
exe "helptags ".htpath
exe "helptags ".fnameescape(htpath)
echo "did helptags"
endif
@@ -311,7 +381,7 @@ fun! vimball#Vimball(really,...)
setlocal nomod bh=wipe
exe "tabn ".curtabnr
exe "tabc ".vbtabnr
call s:RestoreSettings()
call vimball#RestoreSettings()
call s:ChgDir(curdir)
" call Dret("vimball#Vimball")
@@ -329,12 +399,10 @@ fun! vimball#RmVimball(...)
" call Dret("vimball#RmVimball : (g:vimball_norecord)")
return
endif
let eikeep= &ei
set ei=all
" call Decho("turned off all events")
if a:0 == 0
let curfile= '^'.expand("%:tr")
let curfile= expand("%:tr")
" call Decho("case a:0=0: curfile<".curfile."> (used expand(%:tr))")
else
if a:1 =~ '[\/]'
call vimball#ShowMesg(s:USAGE,"RmVimball vimballname [path]")
@@ -342,11 +410,10 @@ fun! vimball#RmVimball(...)
return
endif
let curfile= a:1
" call Decho("case a:0=".a:0.": curfile<".curfile.">")
endif
if curfile !~ '.vba$'
let curfile= curfile.".vba: "
else
let curfile= curfile.": "
if curfile =~ '\.vba$'
let curfile= substitute(curfile,'\.vba','','')
endif
if a:0 >= 2
let home= expand(a:2)
@@ -365,13 +432,34 @@ fun! vimball#RmVimball(...)
keepalt keepjumps 1split
silent! keepalt keepjumps e .VimballRecord
let keepsrch= @/
if search(curfile,'cw')
let exestring= substitute(getline("."),curfile,'','')
" call Decho("search for ^".curfile.".vba:")
" call Decho("search for ^".curfile."[-0-9.]*.vba:")
if search('^'.curfile.": ".'cw')
let foundit= 1
elseif search('^'.curfile.".vba: ",'cw')
let foundit= 1
elseif search('^'.curfile.'[-0-9.]*.vba: ','cw')
let foundit= 1
else
let foundit = 0
endif
if foundit
let exestring = substitute(getline("."),'^'.curfile.'\S\{-}\.vba: ','','')
let s:VBRstring= substitute(exestring,'call delete(','','g')
let s:VBRstring= substitute(s:VBRstring,"[')]",'','g')
" call Decho("exe ".exestring)
silent! keepalt keepjumps exe exestring
silent! keepalt keepjumps d
let exestring= strlen(substitute(exestring,'call delete(.\{-})|\=',"D","g"))
" call Decho("exestring<".exestring.">")
echomsg "removed ".exestring." files"
else
" call Decho("unable to find <".curfile."> in .VimballRecord")
let s:VBRstring= ''
let curfile = substitute(curfile,'\.vba','','')
" call Decho("unable to find <".curfile."> in .VimballRecord")
if !exists("s:ok_unablefind")
call vimball#ShowMesg(s:WARNING,"(RmVimball) unable to find <".curfile."> in .VimballRecord")
endif
endif
silent! keepalt keepjumps g/^\s*$/d
silent! keepalt keepjumps wq!
@@ -379,10 +467,6 @@ fun! vimball#RmVimball(...)
endif
call s:ChgDir(curdir)
" restoring events
" call Decho("restoring events")
let &ei= eikeep
" call Dret("vimball#RmVimball")
endfun
@@ -393,21 +477,56 @@ fun! vimball#Decompress(fname)
" decompression:
if expand("%") =~ '.*\.gz' && executable("gunzip")
exe "!gunzip ".a:fname
" handle *.gz with gunzip
silent exe "!gunzip ".s:Escape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) gunzip may have failed with <".a:fname.">")
endif
let fname= substitute(a:fname,'\.gz$','','')
exe "e ".escape(fname,' \')
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
elseif expand("%") =~ '.*\.gz' && executable("gzip")
" handle *.gz with gzip -d
silent exe "!gzip -d ".s:Escape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "gzip -d" may have failed with <'.a:fname.">")
endif
let fname= substitute(a:fname,'\.gz$','','')
exe "e ".escape(fname,' \')
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
elseif expand("%") =~ '.*\.bz2' && executable("bunzip2")
exe "!bunzip2 ".a:fname
" handle *.bz2 with bunzip2
silent exe "!bunzip2 ".s:Escape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) bunzip2 may have failed with <".a:fname.">")
endif
let fname= substitute(a:fname,'\.bz2$','','')
exe "e ".escape(fname,' \')
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
elseif expand("%") =~ '.*\.bz2' && executable("bzip2")
" handle *.bz2 with bzip2 -d
silent exe "!bzip2 -d ".s:Escape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "bzip2 -d" may have failed with <'.a:fname.">")
endif
let fname= substitute(a:fname,'\.bz2$','','')
exe "e ".escape(fname,' \')
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
elseif expand("%") =~ '.*\.zip' && executable("unzip")
exe "!unzip ".a:fname
" handle *.zip with unzip
silent exe "!unzip ".s:Escape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) unzip may have failed with <".a:fname.">")
endif
let fname= substitute(a:fname,'\.zip$','','')
exe "e ".escape(fname,' \')
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
endif
set noma bt=nofile fmr=[[[,]]] fdm=marker
" call Dret("Decompress")
@@ -443,36 +562,16 @@ fun! vimball#ShowMesg(level,msg)
" call Dret("vimball#ShowMesg")
endfun
" ---------------------------------------------------------------------
let &cpo= s:keepcpo
unlet s:keepcpo
" =====================================================================
" s:ChgDir: change directory (in spite of Windoze) {{{2
fun! s:ChgDir(newdir)
" call Dfunc("ChgDir(newdir<".a:newdir.">)")
if (has("win32") || has("win95") || has("win64") || has("win16"))
exe 'silent cd '.escape(substitute(a:newdir,'/','\\','g'),' ')
exe 'silent cd '.fnameescape(substitute(a:newdir,'/','\\','g'))
else
exe 'silent cd '.escape(a:newdir,' ')
exe 'silent cd '.fnameescape(a:newdir)
endif
" call Dret("ChgDir")
endfun
" ---------------------------------------------------------------------
" s:Path: prepend and append quotes, do escaping, as necessary {{{2
fun! s:Path(cmd,quote)
" call Dfunc("Path(cmd<".a:cmd."> quote<".a:quote.">)")
if (has("win32") || has("win95") || has("win64") || has("win16"))
let cmdpath= a:quote.substitute(a:cmd,'/','\\','g').a:quote
else
let cmdpath= a:quote.a:cmd.a:quote
endif
if a:quote == ""
let cmdpath= escape(cmdpath,' ')
endif
" call Dret("Path <".cmdpath.">")
return cmdpath
" call Dret("ChgDir : curdir<".getcwd().">")
endfun
" ---------------------------------------------------------------------
@@ -485,23 +584,20 @@ fun! s:RecordInVar(home,cmd)
" else
" let s:recorddir= s:recorddir."|".substitute(a:cmd,'^rmdir',"call s:Rmdir",'')
" endif
" call Decho("recorddir=".s:recorddir)
elseif !exists("s:recordfile")
let s:recordfile= a:cmd
" call Decho("recordfile=".s:recordfile)
else
let s:recordfile= s:recordfile."|".a:cmd
" call Decho("recordfile=".s:recordfile)
endif
" call Dret("RecordInVar")
" call Dret("RecordInVar : s:recordfile<".(exists("s:recordfile")? s:recordfile : "")."> s:recorddir<".(exists("s:recorddir")? s:recorddir : "").">")
endfun
" ---------------------------------------------------------------------
" s:RecordInFile: {{{2
fun! s:RecordInFile(home)
" call Dfunc("RecordInFile()")
" call Dfunc("s:RecordInFile()")
if exists("g:vimball_norecord")
" call Dret("RecordInFile : (g:vimball_norecord)")
" call Dret("s:RecordInFile : g:vimball_norecord")
return
endif
@@ -509,8 +605,12 @@ fun! s:RecordInFile(home)
let curdir= getcwd()
call s:ChgDir(a:home)
keepalt keepjumps 1split
let cmd= expand("%:tr").": "
" call Decho("cmd<".cmd.">")
silent! keepalt keepjumps e .VimballRecord
setlocal ma
$
if exists("s:recordfile") && exists("s:recorddir")
let cmd= cmd.s:recordfile."|".s:recorddir
@@ -519,34 +619,32 @@ fun! s:RecordInFile(home)
elseif exists("s:recordfile")
let cmd= cmd.s:recordfile
else
" call Dret("RecordInFile")
" call Dret("s:RecordInFile : neither recordfile nor recorddir exist")
return
endif
" call Decho("cmd<".cmd.">")
" put command into buffer, write .VimballRecord `file
keepalt keepjumps put=cmd
silent! keepalt keepjumps g/^\s*$/d
silent! keepalt keepjumps wq!
call s:ChgDir(curdir)
if exists("s:recorddir") |unlet s:recorddir |endif
if exists("s:recordfile")|unlet s:recordfile|endif
if exists("s:recorddir")
" call Decho("unlet s:recorddir<".s:recorddir.">")
unlet s:recorddir
endif
if exists("s:recordfile")
" call Decho("unlet s:recordfile<".s:recordfile.">")
unlet s:recordfile
endif
else
" call Decho("s:record[file|dir] doesn't exist")
endif
" call Dret("RecordInFile")
" call Dret("s:RecordInFile")
endfun
" ---------------------------------------------------------------------
" s:Rmdir: {{{2
"fun! s:Rmdir(dirname)
"" call Dfunc("s:Rmdir(dirname<".a:dirname.">)")
" if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
" call system("del ".a:dirname)
" else
" call system("rmdir ".a:dirname)
" endif
"" call Dret("s:Rmdir")
"endfun
" ---------------------------------------------------------------------
" s:VimballHome: determine/get home directory path (usually from rtp) {{{2
fun! s:VimballHome()
@@ -557,6 +655,11 @@ fun! s:VimballHome()
" go to vim plugin home
for home in split(&rtp,',') + ['']
if isdirectory(home) && filewritable(home) | break | endif
let basehome= substitute(home,'[/\\]\.vim$','','')
if isdirectory(basehome) && filewritable(basehome)
let home= basehome."/.vim"
break
endif
endfor
if home == ""
" just pick the first directory
@@ -566,13 +669,25 @@ fun! s:VimballHome()
let home= substitute(home,'/','\\','g')
endif
endif
" insure that the home directory exists
" call Decho("picked home<".home.">")
if !isdirectory(home)
if exists("g:vimball_mkdir")
" call Decho("home<".home."> isn't a directory -- making it now with g:vimball_mkdir<".g:vimball_mkdir.">")
" call Decho("system(".g:vimball_mkdir." ".s:Escape(home).")")
call system(g:vimball_mkdir." ".s:Escape(home))
else
" call Decho("home<".home."> isn't a directory -- making it now with mkdir()")
call mkdir(home)
endif
endif
" call Dret("VimballHome <".home.">")
return home
endfun
" ---------------------------------------------------------------------
" s:SaveSettings: {{{2
fun! s:SaveSettings()
" vimball#SaveSettings: {{{2
fun! vimball#SaveSettings()
" call Dfunc("SaveSettings()")
let s:makeep = getpos("'a")
let s:regakeep= @a
@@ -580,30 +695,33 @@ fun! s:SaveSettings()
let s:acdkeep = &acd
endif
let s:eikeep = &ei
let s:fenkeep = &fen
let s:fenkeep = &l:fen
let s:hidkeep = &hidden
let s:ickeep = &ic
let s:lzkeep = &lz
let s:pmkeep = &pm
let s:repkeep = &report
let s:vekeep = &ve
let s:ffkeep = &l:ff
if exists("&acd")
set ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm=
setlocal ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm= ff=unix
else
set ei=all ve=all nofen noic report=999 nohid bt= ma lz pm=
setlocal ei=all ve=all nofen noic report=999 nohid bt= ma lz pm= ff=unix
endif
" vimballs should be in unix format
setlocal ff=unix
" call Dret("SaveSettings")
endfun
" ---------------------------------------------------------------------
" s:RestoreSettings: {{{2
fun! s:RestoreSettings()
" vimball#RestoreSettings: {{{2
fun! vimball#RestoreSettings()
" call Dfunc("RestoreSettings()")
let @a = s:regakeep
if exists("&acd")
let &acd = s:acdkeep
endif
let &fen = s:fenkeep
let &l:fen = s:fenkeep
let &hidden = s:hidkeep
let &ic = s:ickeep
let &lz = s:lzkeep
@@ -611,20 +729,34 @@ fun! s:RestoreSettings()
let &report = s:repkeep
let &ve = s:vekeep
let &ei = s:eikeep
let &l:ff = s:ffkeep
if s:makeep[0] != 0
" restore mark a
" call Decho("restore mark-a: makeep=".string(makeep))
call setpos("'a",s:makeep)
endif
if exists("&acd")
unlet s:regakeep s:acdkeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep
else
unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep
unlet s:acdkeep
endif
set bt=nofile noma
unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep s:ffkeep
" call Dret("RestoreSettings")
endfun
" ---------------------------------------------------------------------
" s:Escape: {{{2
fun s:Escape(name)
" shellescape() was added by patch 7.0.111
if exists("*shellescape")
return shellescape(a:name)
endif
return g:netrw_shq . a:name . g:netrw_shq
endfun
" ---------------------------------------------------------------------
" Restore:
let &cpo= s:keepcpo
unlet s:keepcpo
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim: fdm=marker
-1
View File
@@ -381,4 +381,3 @@ let g:xmldata_html32 = {
\ 'param': ['/>', ''],
\ }
\ }
" vim:ft=vim:ff=unix
-1
View File
@@ -466,4 +466,3 @@ let g:xmldata_html401t = {
\ 'param': ['/>', ''],
\ }
\ }
" vim:ft=vim:ff=unix
-1
View File
@@ -408,4 +408,3 @@ let g:xmldata_html401s = {
\ 'param': ['/>', ''],
\ }
\ }
" vim:ft=vim:ff=unix
-1
View File
@@ -458,4 +458,3 @@ let g:xmldata_html401t = {
\ 'param': ['/>', ''],
\ }
\ }
" vim:ft=vim:ff=unix
-1
View File
@@ -466,4 +466,3 @@ let g:xmldata_html40t = {
\ 'param': ['/>', ''],
\ }
\ }
" vim:ft=vim:ff=unix
-1
View File
@@ -408,4 +408,3 @@ let g:xmldata_html40s = {
\ 'param': ['/>', ''],
\ }
\ }
" vim:ft=vim:ff=unix
-1
View File
@@ -458,4 +458,3 @@ let g:xmldata_html40t = {
\ 'param': ['/>', ''],
\ }
\ }
" vim:ft=vim:ff=unix
-1
View File
@@ -467,4 +467,3 @@ let g:xmldata_xhtml10f = {
\ 'param': ['/>', ''],
\ }
\ }
" vim:ft=vim:ff=unix
-1
View File
@@ -408,4 +408,3 @@ let g:xmldata_xhtml10s = {
\ 'param': ['/>', ''],
\ }
\ }
" vim:ft=vim:ff=unix
-1
View File
@@ -458,4 +458,3 @@ let g:xmldata_xhtml10t = {
\ 'param': ['/>', ''],
\ }
\ }
" vim:ft=vim:ff=unix
-1
View File
@@ -432,4 +432,3 @@ let g:xmldata_xhtml11 = {
\ 'param': ['/>', ''],
\ }
\ }
" vim:ft=vim:ff=unix
+6 -4
View File
@@ -1,10 +1,12 @@
" Vim completion script
" Language: XML
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2006 Jul 18
" Version: 1.8
" Last Change: 2006 Aug 15
" Version: 1.9
"
" Changelog:
" 1.9 - 2007 Aug 15
" - fix closing of namespaced tags (Johannes Weiss)
" 1.8 - 2006 Jul 18
" - allow for closing of xml tags even when data file isn't available
@@ -413,12 +415,12 @@ function! xmlcomplete#GetLastOpenTag(unaryTagsStack)
if exists("b:xml_namespace")
if b:xml_namespace == 'DEFAULT'
let tagpat='</\=\(\k\|[.-]\)\+\|/>'
let tagpat='</\=\(\k\|[.:-]\)\+\|/>'
else
let tagpat='</\='.b:xml_namespace.':\(\k\|[.-]\)\+\|/>'
endif
else
let tagpat='</\=\(\k\|[.-]\)\+\|/>'
let tagpat='</\=\(\k\|[.:-]\)\+\|/>'
endif
while (linenum>0)
let line=getline(linenum)
+55 -41
View File
@@ -1,16 +1,16 @@
" zip.vim: Handles browsing zipfiles
" AUTOLOAD PORTION
" Date: May 08, 2007
" Version: 14
" Date: Jul 30, 2008
" Version: 22
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
" Copyright: Copyright (C) 2005-2008 Charles E. Campbell, Jr. {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
" notice is copied with it. Like anything else that's free,
" zipPlugin.vim is provided *as is* and comes with no warranty
" of any kind, either expressed or implied. By using this
" plugin, you agree that in no event will the copyright
" zip.vim and zipPlugin.vim are provided *as is* and comes with
" no warranty of any kind, either expressed or implied. By using
" this plugin, you agree that in no event will the copyright
" holder be liable for any damages resulting from the use
" of this software.
@@ -22,7 +22,7 @@ if &cp || exists("g:loaded_zip") || v:version < 700
finish
endif
let g:loaded_zip = "v14"
let g:loaded_zip = "v22"
let s:zipfile_escape = ' ?&;\'
let s:ERROR = 2
let s:WARNING = 1
@@ -31,7 +31,9 @@ let s:NOTE = 0
" ---------------------------------------------------------------------
" Global Values: {{{1
if !exists("g:zip_shq")
if has("unix")
if &shq != ""
let g:zip_shq= &shq
elseif has("unix")
let g:zip_shq= "'"
else
let g:zip_shq= '"'
@@ -56,6 +58,12 @@ fun! zip#Browse(zipfile)
set report=10
" sanity checks
if !exists("*fnameescape")
if &verbose > 1
echoerr "the zip plugin is not available (your vim doens't support fnameescape())"
endif
return
endif
if !executable(g:zip_unzipcmd)
redraw!
echohl Error | echo "***error*** (zip#Browse) unzip not available on your system"
@@ -89,23 +97,24 @@ fun! zip#Browse(zipfile)
set ft=tar
" give header
exe "$put ='".'\"'." zip.vim version ".g:loaded_zip."'"
exe "$put ='".'\"'." Browsing zipfile ".a:zipfile."'"
exe "$put ='".'\"'." Select a file with cursor and press ENTER"."'"
let lastline= line("$")
call setline(lastline+1,'" zip.vim version '.g:loaded_zip)
call setline(lastline+2,'" Browsing zipfile '.a:zipfile)
call setline(lastline+3,'" Select a file with cursor and press ENTER')
$put =''
0d
$
" call Decho("exe silent r! ".g:zip_unzipcmd." -l ".s:QuoteFileDir(a:zipfile))
exe "silent r! ".g:zip_unzipcmd." -l ".s:QuoteFileDir(a:zipfile)
" call Decho("exe silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1))
exe "silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1)
if v:shell_error != 0
redraw!
echohl WarningMsg | echo "***warning*** (zip#Browse) ".a:zipfile." is not a zip file" | echohl None
echohl WarningMsg | echo "***warning*** (zip#Browse) ".fnameescape(a:zipfile)." is not a zip file" | echohl None
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
silent %d
let eikeep= &ei
set ei=BufReadCmd,FileReadCmd
exe "r ".a:zipfile
exe "r ".fnameescape(a:zipfile)
let &ei= eikeep
1d
" call Dret("zip#Browse")
@@ -160,10 +169,12 @@ fun! s:ZipBrowseSelect()
" call Decho("curfile<".curfile.">")
new
wincmd _
if !exists("g:zip_nomax") || g:zip_nomax == 0
wincmd _
endif
let s:zipfile_{winnr()}= curfile
" call Decho("exe e zipfile:".escape(zipfile,s:zipfile_escape).'::'.escape(fname,s:zipfile_escape))
exe "e zipfile:".escape(zipfile,s:zipfile_escape).'::'.escape(fname,s:zipfile_escape)
" call Decho("exe e ".fnameescape("zipfile:".zipfile.'::'.fname))
exe "e ".fnameescape("zipfile:".zipfile.'::'.fname)
filetype detect
let &report= repkeep
@@ -188,8 +199,8 @@ fun! zip#Read(fname,mode)
" call Decho("zipfile<".zipfile.">")
" call Decho("fname <".fname.">")
" call Decho("exe r! ".g:zip_unzipcmd." -p ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
exe "silent r! ".g:zip_unzipcmd." -p ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname)
" call Decho("exe r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1))
exe "silent r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1)
" cleanup
0d
@@ -262,7 +273,7 @@ fun! zip#Write(fname)
if fname =~ '/'
let dirpath = substitute(fname,'/[^/]\+$','','e')
if executable("cygpath")
let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
let dirpath = substitute(system("cygpath ".s:Escape(dirpath,0)),'\n','','e')
endif
" call Decho("mkdir(dirpath<".dirpath.">,p)")
call mkdir(dirpath,"p")
@@ -272,17 +283,17 @@ fun! zip#Write(fname)
endif
" call Decho("zipfile<".zipfile."> fname<".fname.">")
exe "w! ".escape(fname,s:zipfile_escape)
exe "w! ".fnameescape(fname)
if executable("cygpath")
let zipfile = substitute(system("cygpath ".zipfile),'\n','','e')
let zipfile = substitute(system("cygpath ".s:Escape(zipfile,0)),'\n','','e')
endif
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
let fname = substitute(fname, '[', '[[]', 'g')
endif
" call Decho(g:zip_zipcmd." -u ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
call system(g:zip_zipcmd." -u ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
" call Decho(g:zip_zipcmd." -u ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0))
call system(g:zip_zipcmd." -u ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0))
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname | echohl None
@@ -296,7 +307,7 @@ fun! zip#Write(fname)
let binkeep= &binary
let eikeep = &ei
set binary ei=all
exe "e! ".zipfile
exe "e! ".fnameescape(zipfile)
call netrw#NetWrite(netzipfile)
let &ei = eikeep
let &binary = binkeep
@@ -316,11 +327,20 @@ fun! zip#Write(fname)
endfun
" ---------------------------------------------------------------------
" QuoteFileDir: {{{2
fun! s:QuoteFileDir(fname)
" call Dfunc("QuoteFileDir(fname<".a:fname.">)")
" call Dret("QuoteFileDir")
return g:zip_shq.a:fname.g:zip_shq
" s:Escape: {{{2
fun! s:Escape(fname,isfilt)
" call Dfunc("QuoteFileDir(fname<".a:fname."> isfilt=".a:isfilt.")")
if exists("*shellescape")
if a:isfilt
let qnameq= shellescape(a:fname,1)
else
let qnameq= shellescape(a:fname)
endif
else
let qnameq= g:zip_shq.escape(a:fname,g:zip_shq).g:zip_shq
endif
" call Dret("QuoteFileDir <".qnameq.">")
return qnameq
endfun
" ---------------------------------------------------------------------
@@ -328,14 +348,8 @@ endfun
fun! s:ChgDir(newdir,errlvl,errmsg)
" call Dfunc("ChgDir(newdir<".a:newdir."> errlvl=".a:errlvl." errmsg<".a:errmsg.">)")
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
let newdir= escape(a:newdir,' ')
else
let newdir= escape(a:newdir,'\ ')
endif
try
exe "cd ".newdir
exe "cd ".fnameescape(a:newdir)
catch /^Vim\%((\a\+)\)\=:E344/
redraw!
if a:errlvl == s:NOTE
@@ -355,13 +369,13 @@ fun! s:ChgDir(newdir,errlvl,errmsg)
endfun
" ---------------------------------------------------------------------
" Rmdir: {{{2
" s:Rmdir: {{{2
fun! s:Rmdir(fname)
" call Dfunc("Rmdir(fname<".a:fname.">)")
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
call system("rmdir /S/Q ".s:QuoteFileDir(a:fname))
call system("rmdir /S/Q ".s:Escape(a:fname,0))
else
call system("/bin/rm -rf ".s:QuoteFileDir(a:fname))
call system("/bin/rm -rf ".s:Escape(a:fname,0))
endif
" call Dret("Rmdir")
endfun
+3
View File
@@ -50,6 +50,9 @@ If you think you have a color scheme that is good enough to be used by others,
please check the following items:
- Does it work in a color terminal as well as in the GUI?
- Is "g:colors_name" set to a meaningful value? In case of doubt you can do
it this way:
let g:colors_name = expand('<sfile>:t:r')
- Is 'background' either used or appropriately set to "light" or "dark"?
- Try setting 'hlsearch' and searching for a pattern, is the match easy to
spot?
+7 -1
View File
@@ -1,6 +1,6 @@
" Vim color file
" Maintainer: Bohdan Vlasyuk <bohdan@vstu.edu.ua>
" Last Change: 2006 Apr 30
" Last Change: 2008 Jul 18
" darkblue -- for those who prefer dark background
" [note: looks bit uglier with come terminal palettes,
@@ -58,3 +58,9 @@ hi PreProc ctermfg=magenta guifg=#ff80ff gui=none cterm=none
hi type ctermfg=green guifg=#60ff60 gui=none cterm=none
hi Underlined cterm=underline term=underline
hi Ignore guifg=bg ctermfg=bg
" suggested by tigmoid, 2008 Jul 18
hi Pmenu guifg=#c0c0c0 guibg=#404080
hi PmenuSel guifg=#c0c0c0 guibg=#2050d0
hi PmenuSbar guifg=blue guibg=darkgray
hi PmenuThumb guifg=#c0c0c0
+12 -4
View File
@@ -1,7 +1,7 @@
" MacVim colorscheme
"
" Maintainer: Bjorn Winckler <bjorn.winckler@gmail.com>
" Last Change: 2007 Nov 17
" Last Change: 2008 May 9
"
" This is the default MacVim color scheme. It supports both light and dark
" backgrounds (see :h 'background').
@@ -50,7 +50,11 @@ hi TabLineFill gui=reverse
hi TabLineSel gui=bold
hi Title gui=bold guifg=DeepSkyBlue3
hi VertSplit gui=NONE guifg=DarkSlateGray guibg=Gray90
hi Visual guibg=MacSelectedTextBackgroundColor
if has("gui_macvim")
hi Visual guibg=MacSelectedTextBackgroundColor
else
hi Visual guibg=#72F7FF
endif
hi WarningMsg guifg=Firebrick2
" Syntax items (`:he group-name` -- more groups are available, these are just
@@ -101,7 +105,11 @@ else
hi DiffText gui=NONE guibg=Gold
hi LineNr guifg=#888888 guibg=#E6E6E6
hi MatchParen guifg=White guibg=MediumPurple1
hi Normal gui=NONE guifg=MacTextColor guibg=MacTextBackgroundColor
if has("gui_macvim")
hi Normal gui=NONE guifg=MacTextColor guibg=MacTextBackgroundColor
else
hi Normal gui=NONE guifg=Black guibg=White
endif
hi Search guibg=CadetBlue1 guifg=NONE
hi Statement gui=bold guifg=Maroon guibg=NONE
hi Todo gui=NONE guifg=DarkGreen guibg=PaleGreen1
@@ -115,7 +123,7 @@ endif
" Change the selection color on focus change (but only if the "macvim"
" colorscheme is active).
"
if !exists("s:augroups_defined")
if has("gui_macvim") && !exists("s:augroups_defined")
au FocusLost * if exists("colors_name") && colors_name == "macvim" | hi Visual guibg=MacSecondarySelectedControlColor | endif
au FocusGained * if exists("colors_name") && colors_name == "macvim" | hi Visual guibg=MacSelectedTextBackgroundColor | endif
+1
View File
@@ -9,6 +9,7 @@ if version > 580
syntax reset
endif
endif
let colors_name = "slate"
:hi Normal guifg=White guibg=grey15
:hi Cursor guibg=khaki guifg=slategrey
:hi VertSplit guibg=#c2bfa5 guifg=grey40 gui=none cterm=reverse
+11 -10
View File
@@ -3,14 +3,15 @@
" Language: Ada (Dec Ada)
" $Id$
" Copyright: Copyright (C) 2006 Martin Krischik
" Maintainer: Martin Krischik
" Maintainer: Martin Krischik <krischik@users.sourceforge.net>
" $Author$
" $Date$
" Version: 4.2
" Version: 4.6
" $Revision$
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/decada.vim $
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/decada.vim $
" History: 21.07.2006 MK New Dec Ada
" 15.10.2006 MK Bram's suggestion for runtime integration
" 08.09.2006 MK Correct double load protection.
" Help Page: compiler-decada
"------------------------------------------------------------------------------
@@ -24,6 +25,13 @@ let current_compiler = "decada"
if !exists("g:decada")
let g:decada = decada#New ()
call ada#Map_Menu (
\'Dec Ada.Build',
\'<F7>',
\'call decada.Make ()')
call g:decada.Set_Session ()
endif
if exists(":CompilerSet") != 2
@@ -33,16 +41,9 @@ if exists(":CompilerSet") != 2
command -nargs=* CompilerSet setlocal <args>
endif
call g:decada.Set_Session ()
execute "CompilerSet makeprg=" . escape (g:decada.Make_Command, ' ')
execute "CompilerSet errorformat=" . escape (g:decada.Error_Format, ' ')
call ada#Map_Menu (
\'Dec Ada.Build',
\'<F7>',
\'call decada.Make ()')
finish " 1}}}
"------------------------------------------------------------------------------
+1 -1
View File
@@ -38,4 +38,4 @@ CompilerSet errorformat=
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8 ff=unix:
" vim: nowrap sw=2 sts=2 ts=8:
+2 -2
View File
@@ -11,7 +11,7 @@ let current_compiler = "gcc"
let s:cpo_save = &cpo
set cpo-=C
setlocal errorformat=
CompilerSet errorformat=
\%*[^\"]\"%f\"%*\\D%l:\ %m,
\\"%f\"%*\\D%l:\ %m,
\%-G%f:%l:\ %trror:\ (Each\ undeclared\ identifier\ is\ reported\ only\ once,
@@ -25,7 +25,7 @@ setlocal errorformat=
\%DMaking\ %*\\a\ in\ %f
if exists('g:compiler_gcc_ignore_unmatched_lines')
let &errorformat .= ',%-G%.%#'
CompilerSet errorformat+=%-G%.%#
endif
let &cpo = s:cpo_save
+7 -5
View File
@@ -3,15 +3,17 @@
" Language: Ada (GNAT)
" $Id$
" Copyright: Copyright (C) 2006 Martin Krischik
" Maintainer: Martin Krischik
" Maintainer: Martin Krischi <krischik@users.sourceforge.net>k
" Ned Okie <nokie@radford.edu>
" $Author$
" $Date$
" Version: 4.2
" Version: 4.6
" $Revision$
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/gnat.vim $
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/gnat.vim $
" History: 24.05.2006 MK Unified Headers
" 16.07.2006 MK Ada-Mode as vim-ball
" 15.10.2006 MK Bram's suggestion for runtime integration
" 19.09.2007 NO use project file only when there is a project
" Help Page: compiler-gnat
"------------------------------------------------------------------------------
@@ -46,6 +48,8 @@ if !exists("g:gnat")
\ 'GNAT.Set Projectfile\.\.\.',
\ ':SetProject',
\ 'call gnat.Set_Project_File ()')
call g:gnat.Set_Session ()
endif
if exists(":CompilerSet") != 2
@@ -55,8 +59,6 @@ if exists(":CompilerSet") != 2
command -nargs=* CompilerSet setlocal <args>
endif
call g:gnat.Set_Session ()
execute "CompilerSet makeprg=" . escape (g:gnat.Get_Command('Make'), ' ')
execute "CompilerSet errorformat=" . escape (g:gnat.Error_Format, ' ')
+12 -4
View File
@@ -1,7 +1,7 @@
" Vim Compiler File
" Compiler: Perl syntax checks (perl -Wc)
" Maintainer: Christian J. Robinson <infynity@onewest.net>
" Last Change: 2004 Mar 27
" Last Change: 2006 Aug 13
if exists("current_compiler")
finish
@@ -15,12 +15,20 @@ endif
let s:savecpo = &cpo
set cpo&vim
if getline(1) =~# '-[^ ]*T'
CompilerSet makeprg=perl\ -WTc\ %
if exists('g:perl_compiler_force_warnings') && g:perl_compiler_force_warnings == 0
let s:warnopt = 'w'
else
CompilerSet makeprg=perl\ -Wc\ %
let s:warnopt = 'W'
endif
if getline(1) =~# '-[^ ]*T'
let s:taintopt = 'T'
else
let s:taintopt = ''
endif
exe 'CompilerSet makeprg=perl\ -' . s:warnopt . s:taintopt . 'c\ %'
CompilerSet errorformat=
\%-G%.%#had\ compilation\ errors.,
\%-G%.%#syntax\ OK,
+41
View File
@@ -0,0 +1,41 @@
" Vim compiler file
" Language: RSpec
" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
" Info: $Id$
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
if exists("current_compiler")
finish
endif
let current_compiler = "rspec"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
set cpo-=C
CompilerSet makeprg=spec
CompilerSet errorformat=
\%+W'%.%#'\ FAILED,
\%+I'%.%#'\ FIXED,
\%-Cexpected:%.%#,
\%-C\ \ \ \ \ got:%.%#,
\%E%.%#:in\ `load':\ %f:%l:%m,
\%C%f:%l:,
\%W%f:%l:\ warning:\ %m,
\%E%f:%l:in\ %*[^:]:\ %m,
\%E%f:%l:\ %m,
\%-Z%\tfrom\ %f:%l,
\%-Z%p^%.%#,
\%-C%.%#,
\%-G%.%#
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8:
+1 -1
View File
@@ -65,4 +65,4 @@ CompilerSet errorformat=
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8 ff=unix:
" vim: nowrap sw=2 sts=2 ts=8:
+1 -1
View File
@@ -32,4 +32,4 @@ CompilerSet errorformat=\%W\ %\\+%\\d%\\+)\ Failure:,
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8 ff=unix:
" vim: nowrap sw=2 sts=2 ts=8:
+37 -14
View File
@@ -14,13 +14,12 @@ VIMEXE = vim
include ../../src/auto/config.mk
DOCS = \
ada.txt \
arabic.txt \
autocmd.txt \
change.txt \
cmdline.txt \
debugger.txt \
debug.txt \
debugger.txt \
develop.txt \
diff.txt \
digraph.txt \
@@ -29,6 +28,8 @@ DOCS = \
farsi.txt \
filetype.txt \
fold.txt \
ft_ada.txt \
ft_sql.txt \
gui.txt \
gui_w16.txt \
gui_w32.txt \
@@ -50,10 +51,10 @@ DOCS = \
insert.txt \
intro.txt \
map.txt \
message.txt \
motion.txt \
mbyte.txt \
message.txt \
mlang.txt \
motion.txt \
netbeans.txt \
options.txt \
os_390.txt \
@@ -89,10 +90,9 @@ DOCS = \
russian.txt \
scroll.txt \
sign.txt \
spell.txt \
sponsor.txt \
starting.txt \
spell.txt \
sql.txt \
syntax.txt \
tabpage.txt \
tagsrch.txt \
@@ -145,7 +145,6 @@ DOCS = \
workshop.txt
HTMLS = \
ada.html \
arabic.html \
autocmd.html \
change.html \
@@ -160,6 +159,8 @@ HTMLS = \
farsi.html \
filetype.html \
fold.html \
ft_ada.html \
ft_sql.html \
gui.html \
gui_w16.html \
gui_w32.html \
@@ -177,14 +178,13 @@ HTMLS = \
if_tcl.html \
indent.html \
index.html \
vimindex.html \
insert.html \
intro.html \
map.html \
message.html \
motion.html \
mbyte.html \
message.html \
mlang.html \
motion.html \
netbeans.html \
options.html \
os_390.html \
@@ -220,10 +220,9 @@ HTMLS = \
russian.html \
scroll.html \
sign.html \
spell.html \
sponsor.html \
starting.html \
spell.html \
sql.html \
syntax.html \
tabpage.html \
tags.html \
@@ -272,6 +271,7 @@ HTMLS = \
version6.html \
version7.html \
vi_diff.html \
vimindex.html \
visual.html \
windows.html \
workshop.html
@@ -287,16 +287,21 @@ CONVERTED = \
vimdiff-it.UTF-8.1 \
vimtutor-it.UTF-8.1 \
xxd-it.UTF-8.1 \
vim-pl.UTF-8.1 \
evim-pl.UTF-8.1 \
vimdiff-pl.UTF-8.1 \
vimtutor-pl.UTF-8.1 \
xxd-pl.UTF-8.1 \
vim-ru.UTF-8.1 \
evim-ru.UTF-8.1 \
vimdiff-ru.UTF-8.1 \
vimtutor-ru.UTF-8.1 \
xxd-ru.UTF-8.1 \
xxd-ru.UTF-8.1
.SUFFIXES:
.SUFFIXES: .c .o .txt .html
all: tags vim.man vimdiff.man vimtutor.man xxd.man $(CONVERTED)
all: tags vim.man evim.man vimdiff.man vimtutor.man xxd.man $(CONVERTED)
# Use Vim to generate the tags file. Can only be used when Vim has been
# compiled and installed. Supports multiple languages.
@@ -314,6 +319,9 @@ doctags: doctags.c
vim.man: vim.1
nroff -man vim.1 | sed -e s/.//g > vim.man
evim.man: evim.1
nroff -man evim.1 | sed -e s/.//g > evim.man
vimdiff.man: vimdiff.1
nroff -man vimdiff.1 | sed -e s/.//g > vimdiff.man
@@ -445,6 +453,21 @@ vimtutor-it.UTF-8.1: vimtutor-it.1
xxd-it.UTF-8.1: xxd-it.1
iconv -f latin1 -t utf-8 $< >$@
vim-pl.UTF-8.1: vim-pl.1
iconv -f latin2 -t utf-8 $< >$@
evim-pl.UTF-8.1: evim-pl.1
iconv -f latin2 -t utf-8 $< >$@
vimdiff-pl.UTF-8.1: vimdiff-pl.1
iconv -f latin2 -t utf-8 $< >$@
vimtutor-pl.UTF-8.1: vimtutor-pl.1
iconv -f latin2 -t utf-8 $< >$@
xxd-pl.UTF-8.1: xxd-pl.1
iconv -f latin2 -t utf-8 $< >$@
vim-ru.UTF-8.1: vim-ru.1
iconv -f KOI8-R -t utf-8 $< >$@
+1 -1
View File
@@ -1,4 +1,4 @@
*arabic.txt* For Vim version 7.1. Last change: 2005 Mar 29
*arabic.txt* For Vim version 7.2. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Nadim Shaikli
+18 -11
View File
@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 7.1. Last change: 2007 Mar 27
*autocmd.txt* For Vim version 7.2. Last change: 2008 Jun 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -104,7 +104,7 @@ local to the script and use mappings local to the script. When the event is
triggered and the command executed, it will run in the context of the script
it was defined in. This matters if |<SID>| is used in a command.
When executing the commands, the messages from one command overwrites a
When executing the commands, the message from one command overwrites a
previous message. This is different from when executing the commands
manually. Mostly the screen will not scroll up, thus there is no hit-enter
prompt. When one command outputs two messages this can happen anyway.
@@ -334,7 +334,7 @@ BufDelete Before deleting a buffer from the buffer list.
list is renamed.
NOTE: When this autocommand is executed, the
current buffer "%" may be different from the
buffer being deleted "<afile>".
buffer being deleted "<afile>" and "<abuf>".
*BufEnter*
BufEnter After entering a buffer. Useful for setting
options for a file type. Also executed when
@@ -400,10 +400,16 @@ BufUnload Before unloading a buffer. This is when the
*BufWinEnter*
BufWinEnter After a buffer is displayed in a window. This
can be when the buffer is loaded (after
processing the modelines), when a hidden
processing the modelines) or when a hidden
buffer is displayed in a window (and is no
longer hidden) or a buffer already visible in
a window is also displayed in another window.
longer hidden).
Does not happen for |:split| without
arguments, since you keep editing the same
buffer, or ":split" with a file that's already
open in a window, because it re-uses an
existing buffer. But it does happen for a
":split" with the name of the current buffer,
since it reloads that buffer.
*BufWinLeave*
BufWinLeave Before a buffer is removed from a window.
Not when it's still visible in another window.
@@ -677,7 +683,7 @@ QuickFixCmdPre Before a quickfix command is run (|:make|,
*QuickFixCmdPost*
QuickFixCmdPost Like QuickFixCmdPre, but after a quickfix
command is run, before jumping to the first
location.
location. See |QuickFixCmdPost-example|.
*RemoteReply*
RemoteReply When a reply from a Vim that functions as
server was received |server2client()|. The
@@ -848,7 +854,7 @@ This autocommand will for example be executed for "/tmp/doc/xx.txt" and
The file name that the pattern is matched against is after expanding
wildcards. Thus is you issue this command: >
wildcards. Thus if you issue this command: >
:e $ROOTDIR/main.$EXT
The argument is first expanded to: >
/usr/root/main.py
@@ -927,7 +933,7 @@ simply use the special string instead of the pattern. Examples: >
" current buffer
:au! * <buffer=33> " remove buffer-local autocommands for
" buffer #33
:dobuf :au! CursorHold <buffer> " remove autocmd for given event for all
:bufdo :au! CursorHold <buffer> " remove autocmd for given event for all
" buffers
:au * <buffer> " list buffer-local autocommands for
" current buffer
@@ -1031,8 +1037,9 @@ option will not cause any commands to be executed.
undefined group name, Vim gives you an error message.
After applying the autocommands the modelines are
processed, so that their overrule the settings from
autocommands, like what happens when editing a file.
processed, so that their settings overrule the
settings from autocommands, like what happens when
editing a file.
*:doautoa* *:doautoall*
:doautoa[ll] [group] {event} [fname]
+88 -52
View File
@@ -1,4 +1,4 @@
*change.txt* For Vim version 7.1. Last change: 2007 Jan 07
*change.txt* For Vim version 7.2. Last change: 2008 Jul 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -229,16 +229,18 @@ key restores the original text (if there was any). (See section "Insert and
Replace mode" |mode-ins-repl|).
*cw* *cW*
Special case: "cw" and "cW" work the same as "ce" and "cE" if the cursor is
on a non-blank. This is because Vim interprets "cw" as change-word, and a
word does not include the following white space. {Vi: "cw" when on a blank
followed by other blanks changes only the first blank; this is probably a
bug, because "dw" deletes all the blanks; use the 'w' flag in 'cpoptions' to
make it work like Vi anyway}
Special case: When the cursor is in a word, "cw" and "cW" do not include the
white space after a word, they only change up to the end of the word. This is
because Vim interprets "cw" as change-word, and a word does not include the
following white space.
{Vi: "cw" when on a blank followed by other blanks changes only the first
blank; this is probably a bug, because "dw" deletes all the blanks; use the
'w' flag in 'cpoptions' to make it work like Vi anyway}
If you prefer "cw" to include the space after a word, use this mapping: >
:map cw dwi
<
Or use "caw" (see |aw|).
*:c* *:ch* *:change*
:{range}c[hange][!] Replace lines of text with some different text.
Type a line containing only "." to stop replacing.
@@ -345,6 +347,10 @@ g?{motion} Rot13 encode {motion} text. {not in Vi}
g?g? *g?g?* *g??*
g?? Rot13 encode current line. {not in Vi}.
To turn one line into title caps, make every first letter of a word
uppercase: >
:s/\v<(.)(\w*)/\u\1\L\2/g
Adding and subtracting ~
*CTRL-A*
@@ -474,7 +480,7 @@ For example: >
A filter is a program that accepts text at standard input, changes it in some
way, and sends it to standard output. You can use the commands below to send
some text through a filter, so that it is replace by the filter output.
some text through a filter, so that it is replaced by the filter output.
Examples of filters are "sort", which sorts lines alphabetically, and
"indent", which formats C program files (you need a version of indent that
works like a filter; not all versions do). The 'shell' option specifies the
@@ -661,9 +667,9 @@ The flags that you can use for the substitute commands:
{not in Vi}
Note that there is no flag to change the "magicness" of the pattern. A
different command is used instead. The reason is that the flags can only be
found by skipping the pattern, and in order to skip the pattern the
"magicness" must be known. Catch 22!
different command is used instead, or you can use |/\v| and friends. The
reason is that the flags can only be found by skipping the pattern, and in
order to skip the pattern the "magicness" must be known. Catch 22!
If the {pattern} for the substitute command is empty, the command uses the
pattern from the last substitute or ":global" command. With the [r] flag, the
@@ -686,7 +692,9 @@ can use any other single-byte character, but not an alphanumeric character,
pattern or replacement string. Example: >
:s+/+//+
For the definition of a pattern, see |pattern|.
For the definition of a pattern, see |pattern|. In Visual block mode, use
|/\%V| in the pattern to have the substitute work in the block only.
Otherwise it works on whole lines anyway.
*sub-replace-special* *:s\=*
When the {string} starts with "\=" it is evaluated as an expression, see
@@ -764,9 +772,9 @@ expression. This does not work recursively: a substitute() function inside
the expression cannot use "\=" for the substitute string.
The special meaning for characters as mentioned at |sub-replace-special| does
not apply except "<CR>", "\<CR>" and "\\". Thus in the result of the
expression you need to use two backslashes get one, put a backslash before a
<CR> you want to insert and use a <CR> without a backslash where you want to
not apply except for "<CR>", "\<CR>" and "\\". Thus in the result of the
expression you need to use two backslashes to get one, put a backslash before a
<CR> you want to insert, and use a <CR> without a backslash where you want to
break the line.
For convenience a <NL> character is also used as a line break. Prepend a
@@ -789,7 +797,7 @@ Examples: >
This replaces an end-of-line with a new line containing the value of $HOME. >
s/E/\="\<Char-0x20ac>"/g
This replaces 'E' characters with an euro sign. Read more in |<Char->|.
This replaces each 'E' character with a euro sign. Read more in |<Char->|.
4.3 Search and replace *search-replace*
@@ -1128,7 +1136,10 @@ nothing is returned. {not in Vi}
Contains the most recent search-pattern. This is used for "n" and 'hlsearch'.
It is writable with ":let", you can change it to have 'hlsearch' highlight
other matches without actually searching. You can't yank or delete into this
register. {not in Vi}
register. The search direction is available in |v:searchforward|.
Note that the valued is restored when returning from a function
|function-search-undo|.
{not in Vi}
*@/*
You can write to a register with a ":let" command |:let-@|. Example: >
@@ -1253,9 +1264,11 @@ an external command, like "par" (e.g.: "!}par" to format until the end of the
paragraph) or set 'formatprg' to "par".
*format-comments*
Vim can format comments in a special way. Vim recognizes a comment by a
specific string at the start of the line (ignoring white space). Three types
of comments can be used:
An overview of comment formatting is in section |30.6| of the user manual.
Vim can automatically insert and format comments in a special way. Vim
recognizes a comment by a specific string at the start of the line (ignoring
white space). Three types of comments can be used:
- A comment string that repeats at the start of each line. An example is the
type of comment used in shell scripts, starting with "#".
@@ -1263,7 +1276,7 @@ of comments can be used:
lines. An example is this list with dashes.
- Three-piece comments that have a start string, an end string, and optional
lines in between. The strings for the start, middle and end are different.
An example is the C-style comment:
An example is the C style comment:
/*
* this is a C comment
*/
@@ -1289,23 +1302,24 @@ type of comment string. A part consists of:
e End of a three-piece comment
l Left adjust middle with start or end (default). Only recognized when
used together with 's' or 'e'.
l Left align. Used together with 's' or 'e', the leftmost character of
start or end will line up with the leftmost character from the middle.
This is the default and can be omitted. See below for more details.
r Right adjust middle with start or end. Only recognized when used
together with 's' or 'e'.
r Right align. Same as above but rightmost instead of leftmost. See
below for more details.
O Don't use this one for the "O" command.
O Don't consider this comment for the "O" command.
x Allows three-piece comments to be ended by just typing the last
character of the end-comment string as the first character on a new
line, when the middle-comment string has already been inserted
automatically. See below for more details.
character of the end-comment string as the first action on a new
line when the middle-comment string has been inserted automatically.
See below for more details.
{digits}
When together with 's' or 'e': add extra indent for the middle part.
This can be used to left-align the middle part with the start or end
and then add an offset.
When together with 's' or 'e': add {digit} amount of offset to an
automatically inserted middle or end comment leader. The offset begins
from a left alignment. See below for more details.
-{digits}
Like {digits} but reduce the indent. This only works when there is
@@ -1334,12 +1348,42 @@ have a middle string because otherwise Vim can't recognize the middle lines.
Notice the use of the "x" flag in the above three-piece comment definition.
When you hit Return in a C-comment, Vim will insert the middle comment leader
for the new line, e.g. " * ". To close this comment you just have to type "/"
for the new line: " * ". To close this comment you just have to type "/"
before typing anything else on the new line. This will replace the
middle-comment leader with the end-comment leader, leaving just " */". There
is no need to hit BackSpace first.
middle-comment leader with the end-comment leader and apply any specified
alignment, leaving just " */". There is no need to hit BackSpace first.
Examples: >
Here is an example of alignment flags at work to make a comment stand out
(kind of looks like a 1 too). Consider comment string >
sr:/***,m:**,ex2:******/
/***
**<--right aligned from "r" flag
**
offset 2 spaces from the "2" flag--->**
******/
In this case, the first comment was typed, then return was pressed 4 times,
then "/" was pressed to end the comment.
Here are some finer points of three part comments. There are three times when
alignment and offset flags are taken into consideration: opening a new line
after a start-comment, opening a new line before an end-comment, and
automatically ending a three-piece comment. The end alignment flag has a
backwards perspective; the result is that the same alignment flag used with
"s" and "e" will result in the same indent for the starting and ending pieces.
Only one alignment per comment part is meant to be used, but an offset number
will override the "r" and "l" flag.
Enabling 'cindent' will override the alignment flags in many cases.
Reindenting using a different method like |gq| or |=| will not consult
alignment flags either. The same behaviour can be defined in those other
formatting options. One consideration is that 'cindent' has additional options
for context based indenting of comments but cannot replicate many three piece
indent alignments. However, 'indentexpr' is has the ability to work better
with three piece comments.
Other examples: >
"b:*" Includes lines starting with "*", but not if the "*" is
followed by a non-blank. This avoids a pointer dereference
like "*str" to be recognized as a comment.
@@ -1350,17 +1394,6 @@ By default, "b:#" is included. This means that a line that starts with
"#include" is not recognized as a comment line. But a line that starts with
"# define" is recognized. This is a compromise.
Often the alignment can be changed from right alignment to a left alignment
with an additional space. For example, for Javadoc comments, this can be
used (insert a backslash before the space when using ":set"): >
s1:/*,mb:*,ex:*/
Note that an offset is included with start, so that the middle part is left
aligned with the start and then an offset of one character added. This makes
it possible to left align the start and middle for this construction: >
/**
* comment
*/
{not available when compiled without the |+comments| feature}
*fo-table*
@@ -1391,7 +1424,7 @@ a Automatic formatting of paragraphs. Every time text is inserted or
n When formatting text, recognize numbered lists. This actually uses
the 'formatlistpat' option, thus any kind of list can be used. The
indent of the text after the number is used for the next line. The
default is to find a number, optionally be followed by '.', ':', ')',
default is to find a number, optionally followed by '.', ':', ')',
']' or '}'. Note that 'autoindent' must be set too. Doesn't work
well together with "2".
Example: >
@@ -1528,10 +1561,12 @@ found here: |sort()|.
With [n] sorting is done on the first decimal number
in the line (after or inside a {pattern} match).
One leading '-' is included in the number.
With [x] sorting is done on the first hexadecimal
number in the line (after or inside a {pattern}
match). A leading "0x" or "0X" is ignored.
One leading '-' is included in the number.
With [o] sorting is done on the first octal number in
the line (after or inside a {pattern} match).
@@ -1555,9 +1590,10 @@ found here: |sort()|.
:sort /.*\%10v/
< To sort on the first number in the line, no matter
what is in front of it: >
:sort /.*\ze\d/
< With [r] sorting is done on the matching {pattern}
:sort /.\{-}\ze\d/
< (Explanation: ".\{-}" matches any text, "\ze" sets the
end of the match and \d matches a digit.)
With [r] sorting is done on the matching {pattern}
instead of skipping past it as described above.
For example, to sort on only the first three letters
of each line: >
+24 -16
View File
@@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 7.1. Last change: 2008 Jan 04
*cmdline.txt* For Vim version 7.2. Last change: 2008 Jul 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -62,7 +62,7 @@ Notes:
old one is removed (to avoid repeated commands moving older commands out of
the history).
- Only commands that are typed are remembered. Ones that completely come from
mappings are not put in the history
mappings are not put in the history.
- All searches are put in the search history, including the ones that come
from commands like "*" and "#". But for a mapping, only the last search is
remembered (to avoid that long mappings trash the history).
@@ -99,19 +99,20 @@ CTRL-E or <End> *c_CTRL-E* *c_<End>*
cursor to end of command-line
*c_<LeftMouse>*
<LeftMouse> cursor to position of mouse click.
<LeftMouse> Move the cursor to the position of the mouse click.
CTRL-H *c_<BS>* *c_CTRL-H*
<BS> delete the character in front of the cursor (see |:fixdel| if
<BS> Delete the character in front of the cursor (see |:fixdel| if
your <BS> key does not do what you want).
*c_<Del>*
<Del> delete the character under the cursor (at end of line:
<Del> Delete the character under the cursor (at end of line:
character before the cursor) (see |:fixdel| if your <Del>
key does not do what you want).
*c_CTRL-W*
CTRL-W delete the word before the cursor
CTRL-W Delete the |word| before the cursor. This depends on the
'iskeyword' option.
*c_CTRL-U*
CTRL-U remove all characters between the cursor position and
CTRL-U Remove all characters between the cursor position and
the beginning of the line. Previous versions of vim
deleted all characters on the line. If that is the
preferred behavior, add the following to your .vimrc: >
@@ -226,6 +227,8 @@ CTRL-J *c_CTRL-J* *c_<NL>* *c_<CR>*
<Esc> When typed and 'x' not present in 'cpoptions', quit
Command-line mode without executing. In macros or when 'x'
present in 'cpoptions', start entered command.
Note: If your <Esc> key is hard to hit on your keyboard, train
yourself to use CTRL-[.
*c_CTRL-C*
CTRL-C quit command-line without executing
@@ -367,7 +370,9 @@ word before the cursor. This is available for:
- Variable and function names: Only after a ":if", ":call" or similar command.
When Vim was compiled with the |+cmdline_compl| feature disabled, only file
names, directories and help items can be completed.
names, directories and help items can be completed. The number of help item
matches is limited (currently to 300) to avoid a long delay when there are
very many matches.
These are the commands that can be used:
@@ -482,7 +487,7 @@ argument.
line. If you want to use '|' in an argument, precede it with '\'.
These commands see the '|' as their argument, and can therefore not be
followed by another command:
followed by another Vim command:
:argdo
:autocmd
:bufdo
@@ -718,6 +723,9 @@ to insert special things while typing you can use the CTRL-R command. For
example, "%" stands for the current file name, while CTRL-R % inserts the
current file name right away. See |c_CTRL-R|.
Note: If you want to avoid the special characters in a Vim script you may want
to use |fnameescape()|.
In Ex commands, at places where a file name can be used, the following
characters have a special meaning. These can also be used in the expression
@@ -893,10 +901,10 @@ Examples: (alternate file name is "?readme?")
:cd <cfile>* :cd {file name under cursor plus "*" and then expanded}
When the expanded argument contains a "!" and it is used for a shell command
(":!cmd", ":r !cmd" or ":w !cmd"), it is escaped with a backslash to avoid it
being expanded into a previously used command. When the 'shell' option
contains "sh", this is done twice, to avoid the shell trying to expand the
"!".
(":!cmd", ":r !cmd" or ":w !cmd"), the "!" is escaped with a backslash to
avoid it being expanded into a previously used command. When the 'shell'
option contains "sh", this is done twice, to avoid the shell trying to expand
the "!".
*filename-backslash*
For filesystems that use a backslash as directory separator (MS-DOS, Windows,
@@ -990,7 +998,7 @@ other than the one that is executed with <CR> are lost.
If you would like to execute the command under the cursor and then have the
command-line window open again, you may find this mapping useful: >
:map <F5> <CR>q:
:autocmd CmdwinEnter * map <buffer> <F5> <CR>q:
VARIOUS
@@ -1037,9 +1045,9 @@ events are not triggered. You can use the Cmdwin events to do settings
specifically for the command-line window. Be careful not to cause side
effects!
Example: >
:au CmdwinEnter : let b:cpt_save = &cpt | set cpt=v
:au CmdwinEnter : let b:cpt_save = &cpt | set cpt=.
:au CmdwinLeave : let &cpt = b:cpt_save
This sets 'complete' to use command-line completion in Insert mode for CTRL-N.
This sets 'complete' to use completion in the current window for |i_CTRL-N|.
Another example: >
:au CmdwinEnter [/?] startinsert
This will make Vim start in Insert mode in the command-line window.
+1 -1
View File
@@ -1,4 +1,4 @@
*debug.txt* For Vim version 7.1. Last change: 2006 May 01
*debug.txt* For Vim version 7.2. Last change: 2006 May 01
VIM REFERENCE MANUAL by Bram Moolenaar
+1 -1
View File
@@ -1,4 +1,4 @@
*debugger.txt* For Vim version 7.1. Last change: 2005 Mar 29
*debugger.txt* For Vim version 7.2. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Gordon Prieur
+1 -1
View File
@@ -1,4 +1,4 @@
*develop.txt* For Vim version 7.1. Last change: 2007 May 11
*develop.txt* For Vim version 7.2. Last change: 2007 May 11
VIM REFERENCE MANUAL by Bram Moolenaar
+4 -4
View File
@@ -1,12 +1,12 @@
*diff.txt* For Vim version 7.1. Last change: 2006 Oct 02
*diff.txt* For Vim version 7.2. Last change: 2008 Jul 21
VIM REFERENCE MANUAL by Bram Moolenaar
*diff* *vimdiff* *gvimdiff* *diff-mode*
This file describes the +diff feature: Showing differences between two or
three versions of the same file.
This file describes the +diff feature: Showing differences between two,
three or four versions of the same file.
The basics are explained in section |08.7| of the user manual.
@@ -49,7 +49,7 @@ What happens is that Vim opens a window for each of the files. This is like
using the |-O| argument. This uses vertical splits. If you prefer horizontal
splits add the |-o| argument: >
vimdiff -o file1 file2 [file3]
vimdiff -o file1 file2 [file3 [file4]]
If you always prefer horizontal splits include "horizontal" in 'diffopt'.
+10 -8
View File
@@ -1,15 +1,15 @@
*digraph.txt* For Vim version 7.1. Last change: 2006 Jul 18
*digraph.txt* For Vim version 7.2. Last change: 2008 Aug 06
VIM REFERENCE MANUAL by Bram Moolenaar
Digraphs *digraphs* *Digraphs*
Digraphs *digraph* *digraphs* *Digraphs*
Digraphs are used to enter characters that normally cannot be entered by
an ordinary keyboard. These are mostly accented characters which have the
eighth bit set. The digraphs are easier to remember than the decimal number
that can be entered with CTRL-V (see |i_CTRL-V|).
an ordinary keyboard. These are mostly printable non-ASCII characters. The
digraphs are easier to remember than the decimal number that can be entered
with CTRL-V (see |i_CTRL-V|).
There is a brief introduction on digraphs in the user manual: |24.9|
An alternative is using the 'keymap' option.
@@ -53,7 +53,9 @@ this file.
The decimal number normally is the Unicode number of the character. Note that
the meaning doesn't change when 'encoding' changes. The character will be
converted from Unicode to 'encoding' when needed. This does require the
conversion to be available, it might fail.
conversion to be available, it might fail. For the NUL character you will see
"10". That's because NUL characters are internally represented with a NL
character. When you write the file it will become a NUL character.
When Vim was compiled without the +multi_byte feature, you need to specify the
character in the encoding given with 'encoding'. You might want to use
@@ -130,10 +132,10 @@ a standard meaning:
Exclamation mark ! Grave
Apostrophe ' Acute accent
Greater-Than sign > Circumflex accent
Question Mark ? tilde
Question mark ? Tilde
Hyphen-Minus - Macron
Left parenthesis ( Breve
Full Stop . Dot Above
Full stop . Dot above
Colon : Diaeresis
Comma , Cedilla
Underline _ Underline
+70 -47
View File
@@ -1,4 +1,4 @@
*editing.txt* For Vim version 7.1. Last change: 2007 May 11
*editing.txt* For Vim version 7.2. Last change: 2008 Aug 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -302,9 +302,9 @@ CTRL-^ Edit the alternate file (equivalent to ":e #").
Uses the 'isfname' option to find out which characters
are supposed to be in a file name. Trailing
punctuation characters ".,:;!" are ignored.
Uses the 'path' option as a list of directory names
to look for the file. Also looks for the file
relative to the current file.
Uses the 'path' option as a list of directory names to
look for the file. See the 'path' option for details
about relative directories and wildcards.
Uses the 'suffixesadd' option to check for file names
with a suffix added.
If the file can't be found, 'includeexpr' is used to
@@ -364,13 +364,16 @@ all over again. The ":e" command is only useful if you have changed the
current file name.
*:filename* *{file}*
Note for systems other than Unix and MS-DOS: When using a command that
accepts a single file name (like ":edit file") spaces in the file name are
allowed, but trailing spaces are ignored. This is useful on systems that
allow file names with embedded spaces (like MS-Windows and the Amiga).
Example: The command ":e Long File Name " will edit the file "Long File
Name". When using a command that accepts more than one file name (like ":next
file1 file2") embedded spaces must be escaped with a backslash.
Besides the things mentioned here, more special items for where a filename is
expected are mentioned at |cmdline-special|.
Note for systems other than Unix: When using a command that accepts a single
file name (like ":edit file") spaces in the file name are allowed, but
trailing spaces are ignored. This is useful on systems that regularly embed
spaces in file names (like MS-Windows and the Amiga). Example: The command
":e Long File Name " will edit the file "Long File Name". When using a
command that accepts more than one file name (like ":next file1 file2")
embedded spaces must be escaped with a backslash.
*wildcard* *wildcards*
Wildcards in {file} are expanded. Which wildcards are supported depends on
@@ -388,6 +391,8 @@ is to use "path\[[]abc]". Then the file "path[abc]" literally.
*starstar-wildcard*
Expanding "**" is possible on Unix, Win32, Mac OS/X and a few other systems.
This allows searching a directory tree. This goes up to 100 directories deep.
Note there are some commands where this works slightly different, see
|file-searching|.
Example: >
:n **/*.txt
Finds files:
@@ -714,23 +719,23 @@ list of the current window.
and |+cmd|. {not in Vi}
*:wn* *:wnext*
:[count]wn[ext] [++opt] [+cmd]
:[count]wn[ext] [++opt]
Write current file and start editing the [count]
next file. Also see |++opt| and |+cmd|. {not in Vi}
:[count]wn[ext] [++opt] [+cmd] {file}
:[count]wn[ext] [++opt] {file}
Write current file to {file} and start editing the
[count] next file, unless {file} already exists and
the 'writeany' option is off. Also see |++opt| and
|+cmd|. {not in Vi}
:[count]wn[ext]! [++opt] [+cmd] {file}
:[count]wn[ext]! [++opt] {file}
Write current file to {file} and start editing the
[count] next file. Also see |++opt| and |+cmd|. {not
in Vi}
:[count]wN[ext][!] [++opt] [+cmd] [file] *:wN* *:wNext*
:[count]wp[revious][!] [++opt] [+cmd] [file] *:wp* *:wprevious*
:[count]wN[ext][!] [++opt] [file] *:wN* *:wNext*
:[count]wp[revious][!] [++opt] [file] *:wp* *:wprevious*
Same as :wnext, but go to previous file instead of
next. {not in Vi}
@@ -850,46 +855,55 @@ Note: When the 'write' option is off, you are not able to write any file.
*:w* *:write*
*E502* *E503* *E504* *E505*
*E512* *E514* *E667* *E796*
:w[rite] Write the whole buffer to the current file. This is
:w[rite] [++opt] Write the whole buffer to the current file. This is
the normal way to save changes to a file. It fails
when the 'readonly' option is set or when there is
another reason why the file can't be written.
For ++opt see |++opt|, but only ++bin, ++nobin, ++ff
and ++enc are effective.
:w[rite]! Like ":write", but forcefully write when 'readonly' is
:w[rite]! [++opt] Like ":write", but forcefully write when 'readonly' is
set or there is another reason why writing was
refused.
Note: This may change the permission and ownership of
the file and break (symbolic) links. Add the 'W' flag
to 'cpoptions' to avoid this.
:[range]w[rite][!] Write the specified lines to the current file. This
:[range]w[rite][!] [++opt]
Write the specified lines to the current file. This
is unusual, because the file will not contain all
lines in the buffer.
*:w_f* *:write_f*
:[range]w[rite] {file} Write the specified lines to {file}, unless it
:[range]w[rite] [++opt] {file}
Write the specified lines to {file}, unless it
already exists and the 'writeany' option is off.
*:w!*
:[range]w[rite]! {file} Write the specified lines to {file}. Overwrite an
:[range]w[rite]! [++opt] {file}
Write the specified lines to {file}. Overwrite an
existing file.
*:w_a* *:write_a* *E494*
:[range]w[rite][!] >> Append the specified lines to the current file.
:[range]w[rite][!] [++opt] >>
Append the specified lines to the current file.
:[range]w[rite][!] >> {file}
:[range]w[rite][!] [++opt] >> {file}
Append the specified lines to {file}. '!' forces the
write even if file does not exist.
*:w_c* *:write_c*
:[range]w[rite] !{cmd} Execute {cmd} with [range] lines as standard input
:[range]w[rite] [++opt] !{cmd}
Execute {cmd} with [range] lines as standard input
(note the space in front of the '!'). {cmd} is
executed like with ":!{cmd}", any '!' is replaced with
the previous command |:!|.
The default [range] for the ":w" command is the whole buffer (1,$). If you
write the whole buffer, it is no longer considered changed. Also when you
write it to a different file with ":w somefile"!
write the whole buffer, it is no longer considered changed. When you
write it to a different file with ":w somefile" it depends on the "+" flag in
'cpoptions'. When included, the write command will reset the 'modified' flag,
even though the buffer itself may still be different from its file.
If a file name is given with ":w" it becomes the alternate file. This can be
used, for example, when the write fails and you want to try again later with
@@ -897,7 +911,8 @@ used, for example, when the write fails and you want to try again later with
'cpoptions' option.
*:sav* *:saveas*
:sav[eas][!] {file} Save the current buffer under the name {file} and set
:sav[eas][!] [++opt] {file}
Save the current buffer under the name {file} and set
the filename of the current buffer to {file}. The
previous name is used for the alternate file name.
The [!] is needed to overwrite an existing file.
@@ -907,7 +922,7 @@ used, for example, when the write fails and you want to try again later with
{not in Vi}
*:up* *:update*
:[range]up[date][!] [>>] [file]
:[range]up[date][!] [++opt] [>>] [file]
Like ":write", but only write when the buffer has been
modified. {not in Vi}
@@ -1056,30 +1071,31 @@ The names can be in upper- or lowercase.
|quickfix|). {not in Vi}
*:wq*
:wq Write the current file and quit. Writing fails when
:wq [++opt] Write the current file and quit. Writing fails when
the file is read-only or the buffer does not have a
name. Quitting fails when the last file in the
argument list has not been edited.
:wq! Write the current file and quit. Writing fails when
:wq! [++opt] Write the current file and quit. Writing fails when
the current buffer does not have a name.
:wq {file} Write to {file} and quit. Quitting fails when the
:wq [++opt] {file} Write to {file} and quit. Quitting fails when the
last file in the argument list has not been edited.
:wq! {file} Write to {file} and quit.
:wq! [++opt] {file} Write to {file} and quit.
:[range]wq[!] [file] Same as above, but only write the lines in [range].
:[range]wq[!] [++opt] [file]
Same as above, but only write the lines in [range].
*:x* *:xit*
:[range]x[it][!] [file]
:[range]x[it][!] [++opt] [file]
Like ":wq", but write only when changes have been
made.
When 'hidden' is set and there are more windows, the
current buffer becomes hidden, after writing the file.
*:exi* *:exit*
:[range]exi[t][!] [file]
:[range]exi[t][!] [++opt] [file]
Same as :xit.
*ZZ*
@@ -1105,22 +1121,24 @@ MULTIPLE WINDOWS AND BUFFERS *window-exit*
changed. See |:confirm|. {not in Vi}
:qa[ll]! Exit Vim. Any changes to buffers are lost. {not in Vi}
Also see |:cquit|, it does the same but exits with a non-zero
value.
*:quita* *:quitall*
:quita[ll][!] Same as ":qall". {not in Vi}
:wqa[ll] *:wqa* *:wqall* *:xa* *:xall*
:wqa[ll] [++opt] *:wqa* *:wqall* *:xa* *:xall*
:xa[ll] Write all changed buffers and exit Vim. If there are buffers
without a file name, which are readonly or which cannot be
written for another reason, Vim will not quit. {not in Vi}
:conf[irm] wqa[ll]
:conf[irm] wqa[ll] [++opt]
:conf[irm] xa[ll]
Write all changed buffers and exit Vim. Bring up a prompt
when some buffers are readonly or cannot be written for
another reason. See |:confirm|. {not in Vi}
:wqa[ll]!
:wqa[ll]! [++opt]
:xa[ll]! Write all changed buffers, even the ones that are readonly,
and exit Vim. If there are buffers without a file name or
which cannot be written for another reason, Vim will not quit.
@@ -1469,21 +1487,25 @@ problem goes away the next day.
{not available when compiled without the |+path_extra| feature}
The file searching is currently used for the 'path', 'cdpath' and 'tags'
options, for |finddir()| and |findfile()|.
options, for |finddir()| and |findfile()|. Other commands use |wildcards|
which is slightly different.
There are three different types of searching:
1) Downward search: *starstar*
Downward search uses the wildcards '*', '**' and possibly others
supported by your operating system. '*' and '**' are handled inside Vim, so
they work on all operating systems.
supported by your operating system. '*' and '**' are handled inside Vim,
so they work on all operating systems. Note that "**" only acts as a
special wildcard when it is at the start of a name.
The usage of '*' is quite simple: It matches 0 or more characters.
The usage of '*' is quite simple: It matches 0 or more characters. In a
search pattern this would be ".*". Note that the "." is not used for file
searching.
'**' is more sophisticated:
- It ONLY matches directories.
- It matches up to 30 directories deep, so you can use it to search an
entire directory tree
- It matches up to 30 directories deep by default, so you can use it to
search an entire directory tree
- The maximum number of levels matched can be given by appending a number
to '**'.
Thus '/usr/**2' can match: >
@@ -1496,15 +1518,16 @@ There are three different types of searching:
....
< It does NOT match '/usr/include/g++/std' as this would be three
levels.
The allowed number range is 0 ('**0' is removed) to 255.
The allowed number range is 0 ('**0' is removed) to 100
If the given number is smaller than 0 it defaults to 30, if it's
bigger than 255 it defaults to 255.
bigger than 100 then 100 is used. The system also has a limit on the
path length, usually 256 or 1024 bytes.
- '**' can only be at the end of the path or be followed by a path
separator or by a number and a path separator.
You can combine '*' and '**' in any order: >
/usr/**/sys/*
/usr/*/sys/**
/usr/*tory/sys/**
/usr/**2/sys/*
2) Upward search:
+684 -261
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,4 +1,4 @@
*farsi.txt* For Vim version 7.1. Last change: 2005 Mar 29
*farsi.txt* For Vim version 7.2. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Mortaza Ghassab Shiran
+51 -7
View File
@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 7.1. Last change: 2007 May 10
*filetype.txt* For Vim version 7.2. Last change: 2008 Jul 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -55,7 +55,7 @@ filetype prepend "ft-" and optionally append "-syntax", "-indent" or
If the file type is not detected automatically, or it finds the wrong type,
you can either set the 'filetype' option manually, or add a modeline to your
file. Example, for in an IDL file use the command: >
file. Example, for an IDL file use the command: >
:set filetype=idl
or add this |modeline| to the file:
@@ -122,7 +122,7 @@ The file types are also used for syntax highlighting. If the ":syntax on"
command is used, the file type detection is installed too. There is no need
to do ":filetype on" after ":syntax on".
To disable one of the file types, add a line in the your filetype file, see
To disable one of the file types, add a line in your filetype file, see
|remove-filetype|.
*filetype-detect*
@@ -284,8 +284,8 @@ match in angle brackets in place of a pattern, like this: >
This will match:
- Any file whose name ends in `.html'
- Any file whose type is `&faf' or 'HTML', where the meaning of these types
- Any file whose name ends in ".html"
- Any file whose type is "&faf" or "HTML", where the meaning of these types
depends on which version of Vim you are using.
Unknown types are considered NOT to match.
@@ -294,7 +294,7 @@ must both match): >
:au BufRead <&fff>diff*
This will match files of type `&fff' whose names start with `diff'.
This will match files of type "&fff" whose names start with "diff".
Note that osfiletype checking is skipped if Vim is compiled without the
|+osfiletype| feature.
@@ -482,6 +482,29 @@ g:changelog_date_end_entry_search
The default is '^\s*$' which finds lines that contain
only whitespace or are completely empty.
b:changelog_name *b:changelog_name*
Name of the ChangeLog file to look for.
The default is 'ChangeLog'.
b:changelog_path
Path of the ChangeLog to use for the current buffer.
The default is empty, thus looking for a file named
|b:changelog_name| in the same directory as the
current buffer. If not found, the parent directory of
the current buffer is searched. This continues
recursively until a file is found or there are no more
parent directories to search.
b:changelog_entry_prefix
Name of a function to call to generate a prefix to a
new entry. This function takes no arguments and
should return a string containing the prefix.
Returning an empty prefix is fine.
The default generates the shortest path between the
ChangeLog's pathname and the current buffers pathname.
In the future, it will also be possible to use other
variable contexts for this variable, for example, g:.
The Changelog entries are inserted where they add the least amount of text.
After figuring out the current date and user, the file is searched for an
entry beginning with the current date and user and if found adds another item
@@ -502,6 +525,13 @@ For further discussion of fortran_have_tabs and the method used for the
detection of source format see |ft-fortran-syntax|.
GIT COMMIT *ft-gitcommit-plugin*
One command, :DiffGitCached, is provided to show a diff of the current commit
in the preview window. It is equivalent to calling "git diff --cached" plus
any arguments given to the command.
MAIL *ft-mail-plugin*
Options:
@@ -546,6 +576,20 @@ CTRL-] Jump to the manual page for the word under the cursor.
CTRL-T Jump back to the previous manual page.
PDF *ft-pdf-plugin*
Two maps, <C-]> and <C-T>, are provided to simulate a tag stack for navigating
the PDF. The following are treated as tags:
- The byte offset after "startxref" to the xref table
- The byte offset after the /Prev key in the trailer to an earlier xref table
- A line of the form "0123456789 00000 n" in the xref table
- An object reference like "1 0 R" anywhere in the PDF
These maps can be disabled with >
:let g:no_pdf_maps = 1
<
RPM SPEC *ft-spec-plugin*
Since the text for this plugin is rather long it has been put in a separate
@@ -555,7 +599,7 @@ file: |pi_spec.txt|.
SQL *ft-sql*
Since the text for this plugin is rather long it has been put in a separate
file: |sql.txt|.
file: |ft_sql.txt|.
TEX *ft-tex-plugin*
+1 -1
View File
@@ -1,4 +1,4 @@
*fold.txt* For Vim version 7.1. Last change: 2007 May 11
*fold.txt* For Vim version 7.2. Last change: 2007 May 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1,4 +1,4 @@
*ada.txt* For Vim version 7.1. Last change: 2007 May 08
*ft_ada.txt* For Vim version 7.2. Last change: 2008 Jun 21
ADA FILE TYPE PLUG-INS REFERENCE MANUAL~
@@ -97,10 +97,10 @@ tags file.
3.1 Omni Completion with "gnat xref" ~
*gnat-xref*
GNAT XREF uses the compiler internal informations (ali-files) to produce the
GNAT XREF uses the compiler internal information (ali-files) to produce the
tags file. This has the advantage to be 100% correct and the option of deep
nested analysis. However the code must compile, the generator is quite
slow and the created tags file contains only the basic Ctags informations for
slow and the created tags file contains only the basic Ctags information for
each entry - not enough for some of the more advanced Vim code browser
plug-ins.
@@ -126,7 +126,7 @@ NOTE: "gnat xref -v" is very tricky to use as it has almost no diagnostic
*ada-ctags*
Exuberant Ctags uses its own multi-language code parser. The parser is quite
fast, produces a lot of extra informations (hence the name "Exuberant Ctags")
fast, produces a lot of extra information (hence the name "Exuberant Ctags")
and can run on files which currently do not compile.
There are also lots of other Vim-tools which use exuberant Ctags.
@@ -467,7 +467,7 @@ ada#Create_Tags ({option}) *ada#Create_Tags()*
file or a file name.
gnat#Insert_Tags_Header() *gnat#Insert_Tags_Header()*
Adds the tag file header (!_TAG_) informations to the current
Adds the tag file header (!_TAG_) information to the current
file which are missing from the GNAT XREF output.
ada#Switch_Syntax_Option ({option}) *ada#Switch_Syntax_Option()*
@@ -512,4 +512,4 @@ contains all of the above.
==============================================================================
vim: textwidth=78 nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab
vim: filetype=help encoding=latin1
vim: filetype=help
@@ -1,4 +1,4 @@
*sql.txt* For Vim version 7.1. Last change: Wed Apr 26 2006 3:05:33 PM
*ft_sql.txt* For Vim version 7.2. Last change: Wed Apr 26 2006 3:05:33 PM
by David Fishburn
+9 -3
View File
@@ -1,4 +1,4 @@
*gui.txt* For Vim version 7.1. Last change: 2007 May 11
*gui.txt* For Vim version 7.2. Last change: 2008 Jun 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -325,16 +325,22 @@ A different kind of selection is used when:
- at the |hit-enter| prompt
- whenever the current mode is not in the 'mouse' option
- when holding the CTRL and SHIFT keys in the GUI
Since Vim continues like the selection isn't there, and there is no mode
associated with the selection, this is called modeless selection. Any text in
the Vim window can be selected. Select the text by pressing the left mouse
button at the start, drag to the end and release. To extend the selection,
use the right mouse button when 'mousemodel' is "extend", or the left mouse
button with the shift key pressed when 'mousemodel' is "popup".
The middle mouse button pastes the text.
The selection is removed when the selected text is scrolled or changed.
On the command line CTRL-Y can be used to copy the selection into the
clipboard. To do this from Insert mode, use CTRL-O : CTRL-Y <CR>.
clipboard. To do this from Insert mode, use CTRL-O : CTRL-Y <CR>. When
'guioptions' contains a or A (default on X11), the selection is automatically
copied to the "* register.
The middle mouse button can then paste the text. On non-X11 systems, you can
use CTRL-R +.
3.4 Using Mouse on Status Lines *gui-mouse-status*
+124 -75
View File
@@ -1,4 +1,4 @@
*gui_mac.txt* For Vim version 7.1. Last change: 2008 Feb 05
*gui_mac.txt* For Vim version 7.2. Last change: 2008 Jul 12
VIM REFERENCE MANUAL by Bjorn Winckler
@@ -124,7 +124,7 @@ strings like "((3) of 2)" to appear in the window title.
*macvim-options*
These are the non-standard options that MacVim supports:
'fullscreen' 'toolbariconsize' 'transparency'
'fullscreen' 'fuoptions' 'toolbariconsize' 'transparency' 'antialias'
*macvim-find*
Whenever you search for something in Vim (e.g. using "/") the search query is
@@ -142,6 +142,11 @@ another in MacVim. Simply search for something in one window (using "/") then
switch to another (e.g. with <D-`>) and hit <D-g> and the search will be
repeated in the new window.
*macvim-backspace* *macvim-delete*
The 'backspace' option is set in the system vimrc to make the delete key
behave in a more familiar way to new users. If you dislike this non-default
behaviour, then add the line "set backspace&" to your "~/.vimrc" file.
==============================================================================
2. Starting MacVim *macvim-start*
@@ -162,10 +167,14 @@ use Mac OS X System Services to open files in MacVim, see |macvim-services|.
There are essentially two ways to start MacVim from Terminal: either call the
Vim binary with the -g switch >
/Applications/MacVim.app/Contents/MacOS/Vim -g file ...
or use the "open" command (which is of limited use since it cannot be used to
pass parameters to Vim) >
or use the "open" command (this method can not be used to pass parameters to
Vim) >
open -a MacVim file ...
<
The advantage of using the latter method is that the settings relating to file
opening in the preferences panel are respected, and files open significantly
faster if preloading of Vim processes is enabled (i.e. if the user default
MMPreloadCacheSize is positive, see |macvim-user-defaults|).
*mvim*
To save yourself from having to type the entire path to the Vim binary each
time you start MacVim, you could create an alias such as >
@@ -207,8 +216,9 @@ is sent back to the server application.
Some settings are global to the MacVim application and would not make sense as
Vim options. These settings are stored in a user default database and can be
accessed via the "MacVim/Preferences..." menu item.
accessed via the "MacVim.Preferences..." menu item.
*macvim-user-defaults*
Not all entries in the user defaults database are exposed via the preference
panel, usually because they should not be changed by the user under normal
circumstances. These options can still be changed with the "defaults" command
@@ -220,10 +230,13 @@ as general information regarding Mac OS X user defaults.
Here is a list of relevant dictionary entries:
KEY VALUE ~
MMAtsuiRenderer enable ATSUI renderer [bool]
MMCellWidthMultiplier width of a normal glyph in em units [float]
MMDialogsTrackPwd open/save dialogs track the Vim pwd [bool]
MMLoginShellArgument login shell parameter [string]
MMLoginShellCommand which shell to use to launch Vim [string]
MMNoFontSubstitution disable automatic font substitution [bool]
MMPreloadCacheSize number of Vim processes to preload [int]
MMTabMaxWidth maximum width of a tab [int]
MMTabMinWidth minimum width of a tab [int]
MMTabOptimumWidth default width of a tab [int]
@@ -233,6 +246,7 @@ MMTextInsetRight text area offset in pixels [int]
MMTextInsetTop text area offset in pixels [int]
MMTexturedWindow use brushed metal window (Tiger only) [bool]
MMTranslateCtrlClick interpret ctrl-click as right-click [bool]
MMVerticalSplit files open in vertical splits [bool]
MMZoomBoth zoom button maximizes both directions [bool]
As an example, if you have more than one mouse button and would wish to free
@@ -309,49 +323,84 @@ than the default?) then post them to |vim_mac|.
==============================================================================
5. Menus *macvim-menus*
*:macm* *:macmenukey*
MacVim has a special way of binding keys to menu items that differs from other
Vim GUI ports. A menu binding is called a "key equivalent" in Mac OS X
terminology, this is displayed on the right side of a menu item. The
":macmenukey" command is used to set the key equivalent of a menu item. This
command takes two parameters, the first names the menu item to bind to, the
second gives the key combination. For example: >
:macmenukey File.New\ Tab <D-t>
This sets the key equivalent of the "New Tab" menu item under the "File" menu
to Cmd+t.
Menus in Mac OS X behave slightly different from other platforms. For that
reason two new commands have been added to Vim. To understand what these
commands do you must first understand how menus work on OS X.
Note that key equivalents:
* must contain the Cmd modifier flag (<D-...>)
* take precedence over normal mappings made with ":map"
* can only be modified during startup (e.g. in .gvimrc)
Each entry in a menu is called a "menu item". With each menu item is
associated: a title, a key equivalent and an action message. When a menu is
displayed the title is shown on the left and the key equivalent (if any) is
shown on the right. Key equivalents enable you to access a menu item using
the keyboard instead of having to use the mouse. When a menu item is clicked
it will send it's associated action message. Actions can be used to instruct
MacVim to paste some text (paste:), open a new window (newWindow:), etc.
Certain actions are standard throughout OS X which is why MacVim must be able
to set these for each menu item. (E.g. the menu item "Edit.Paste" must be
bound to the action "paste:" otherwise pasting won't work in dialogs since
that is the action that instructs them to paste something.)
It is possible to reset a key equivalent by calling :macmenukey with a menu
name but no key. This is so that the default key equivalents can be reset in
"~/.gvimrc". For example, if you would like to free up <D-s> (which is the
key equivalent of "File.Save") then add the following line to "~/.gvimrc": >
macmenukey File.Save
Now you can use :map to bind <D-s> to whatever you like.
Menus are configured using the |:macmenu| command and the |:macaction| command
can be used to send action messages.
It is not necessary to reset a key equivalent if all you want to do is to
change the key equivalent of a menu item. For example, say you want to use
<D-M-Right> as the key equivalent for "Next Tab", then add the following line
to "~/.gvimrc": >
macmenukey Window.Next\ Tab <D-M-Right>
<
*:maca* *:macaction*
It is typical for menu items in Cocoa applications to bind to Objective-C
selectors. To support this, MacVim introduces the ":macaction" command. This
command takes the name of an action message as its only parameter. (An action
message is an Objective-C message with "void" return type and a single
parameter of type "id".) For example, the "New Window" menu item on the
"File" menu is created in the following manner: >
:an 10.290 File.New\ Window :macaction newWindow:<CR>
:maca[ction] {action:} Send the message "action:" to the first responder.
The list of allowed actions can be seen by typing
:maca <C-d>
An attempt to send an action not listed here will
result in an error. This list is specified in a
property list file called |Actions.plist|.
Note 1: A menu item which is bound to ":macaction" will automatically be bound
to that action in all modes (as if ":an" was used). It is not possible to
bind to ":macaction" in one mode only.
Note 2: The action is "nil-targeted", which means it is passed down the first
responder chain.
*:macm* *:macmenu*
:mac[menu] {menu} {key}={arg} ...
Set Mac specific properties for {menu}. The
properties that can be set are:
action the action this menu sends
alt "yes" if alternate of previous menu
key the key equivalent of this menu
This command must be used in a startup file, for
example in "~/.gvimrc". It has no effect otherwise.
For convenience, a menu with "action=name:" which is
bound to <Nop> will act as if bound to
":maca name:<CR>". Thus, if "Menu.Item" is given by
:an Menu.Item <Nop>
:macm Menu.Item action=name:
then ":emenu Menu.Item" is equivalent to
":maca name:".
The key equivalent is specified with the <D-..>
syntax. Note that key equivalents must contain the
Cmd modifier flag (<D-...>), and they take precedence
over normal mappings.
Use the syntax "key=<nop>" to clear the key equivalent
of a menu. This can be used to free up a key
combination that is set in the system gvimrc so that
it may be mapped to using ":map".
Recognised values of "alt" are "0", "no", "1", and
"yes". The default is "no". An alternate menu must
have the same key equivalent as the previous menu,
except the modifier flags must differ. The alternate
menu is by default hidden and only shows up when the
modifier is held down.
Here are some examples on how to use these commands:
1. Create a menu item with title "New Window" under the "File" menu, with key
equivalent Cmd-n, which opens a new window when selected: >
:an 10.290 File.New\ Window <Nop>
:macm File.New\ Window action=newWindow: key=<D-n>
2. Change the key equivalent to cycle through tabs to Cmd-Left/Right: >
:macm Window.Previous\ Tab key=<D-Left>
:macm Window.Next\ Tab key=<D-Right>
3. Create a mapping in normal mode which closes the current tab/window: >
:map <C-w> :maca performClose:<CR>
>
The standard Vim menus are modified in "$VIM/gvimrc". Take a look at that
file for more examples on how to set up menus. Note: When no window is open a
minimal default menu is used. The default menu is set up in MainMenu.nib
which resides in "Resources/English.lproj/" folder inside the app bundle.
*Actions.plist*
Some action messages would not be suitable to call from within Vim, so there
@@ -360,29 +409,30 @@ application bundle) which contains all actions that may be called. The key in
this dictionary is the name of the action message (case sensitive), the value
is not used.
Hint: The |:macaction| command supports command-line completion so you can
enter ":maca<Space><C-d>" to see a list of all available actions.
Here is a random assortment of actions from Actions.plist which might be
useful.
useful.
Action Description ~
fileOpen: Show "File Open" dialog
findNext: Search forward using the "Find Pasteboard"
findPrevious: Search backward using the "Find Pasteboard"
fontSizeDown: Decrease font size
fontSizeUp: Increase font size
hide: Hide MacVim
miniaturizeAll: Minimize all windows to the dock
newWindow: Open a new (empty) window
orderFrontCharacterPalette: Show the the "Special Characters" dialog
orderFrontFontPanel: Show the Font panel
orderFrontPreferencePanel: Show the Preferences panel
performMiniaturize: Minimize window to the dock
performZoom: Zoom window (same as clicking the green blob)
selectNextWindow: Select next window (similar to <D-`>)
selectPreviousWindow: Select previous window (similar to <S-D-`>)
As an example, to map <C-z> to performZoom: you could do something like this: >
:map <silent> <C-z> :macaction performZoom:<CR>
A better way to map to performZoom: would be to set the key equivalent of the
menu item "Window.Zoom" to the above action. This can be done by adding the
following line to "~/.gvimrc": >
macmenukey Window.Zoom <D-C-z>
(Note that key equivalents must contain the 'D' flag.)
terminate: Quit MacVim
zoomAll: Zoom all windows
_cycleWindows: Select next window (similar to <D-`>)
_cycleWindowsBackwards: Select previous window (similar to <D-S-`>)
==============================================================================
6. Toolbar *macvim-toolbar*
@@ -473,18 +523,18 @@ In this section some general (not necessarily MacVim specific) hints are
given.
Scenario: ~
You try opening a bunch of files in tabs but not all files get
opened in their own tab.
You try opening a bunch of files in tabs but not all files get opened in their
own tab.
Solution: ~
To get around this, set 'tabpagemax' to something big in your
.gvimrc file (e.g. ":set tabpagemax=100").
To get around this, set 'tabpagemax' to something big in your .gvimrc file
(e.g. ":set tabpagemax=100").
Scenario: ~
You want to open a file in a tab in an already opened window, but typing
"mvim filename" in Terminal opens it up in a separate window.
You want to open a file in a tab in an already opened window, but typing "mvim
filename" in Terminal opens it up in a separate window.
Solution: ~
Use the |--remote-tab| switch. If you have several windows open you
might have to specify which window you want the file to open in by using the
Use the |--remote-tab| switch. If you have several windows open you might
have to specify which window you want the file to open in by using the
|--servername| switch. The title of a window usually ends in something like
"VIM" or "VIM3" --- this is the server name of that window. So to open a file
named "foobar.txt" in a window whose title ends in "VIM3" you would type (the
@@ -493,8 +543,8 @@ order of the arguments matters): >
For more information, consult the |client-server| manual page.
Scenario: ~
You like to be able to select text by holding down shift and
pressing the arrow keys and find the Vim way of selecting text strange.
You like to be able to select text by holding down shift and pressing the
arrow keys and find the Vim way of selecting text strange.
Solution: ~
See |macvim-shift-movement|.
@@ -506,14 +556,14 @@ See |macvim-movement|.
Scenario: ~
Enabling localized menus breaks the toolbar and the menus as well.
Solution: ~
This is a know problem, see |macvim-todo|.
This is a known problem, see |macvim-todo|.
Scenario: ~
You dislike the default font (DejaVu Sans Mono).
Solution: ~
The standard fixed width font on other Mac OS X applications is
Monaco. If you prefer this font then add the following line to your
"~/.gvimrc" (note that Monaco does not come in italic and bold variants): >
The standard fixed width font on other Mac OS X applications is Monaco. If
you prefer this font then add the following line to your "~/.gvimrc" (note
that Monaco does not come in italic and bold variants): >
set guifont=Monaco:h10
The suffix ":h10" specifies the point size of the font should be "10" (see
'guifont' for more information on how to set the font).
@@ -526,8 +576,8 @@ Hold down Cmd and click the zoom button. If you prefer this to be the default
action, then set the user default MMZoomBoth (see |macvim-prefs|).
Scenario: ~
Typing feels sluggish when the cursor is just before a right bracket (i.e. ')',
'}', or ']').
Typing feels sluggish when the cursor is just before a right bracket (i.e.
')', '}', or ']').
Solution: ~
Disable the "matchparen" plugin (see |matchparen|) by typing :NoMatchParen.
If that helps, then you can permanently disable "matchparen" by adding the
@@ -536,10 +586,9 @@ following line to your "~/.vimrc": >
<
Scenario: ~
You can't find the information on MacVim you thought should be in
this manual page.
You can't find the information on MacVim you thought should be in this manual
page.
Solution: ~
Post your question on the |vim_mac| mailing list and wait for an
answer.
Post your question on the |vim_mac| mailing list and wait for an answer.
vim:tw=78:sw=4:ts=8:ft=help:norl:
+1 -1
View File
@@ -1,4 +1,4 @@
*gui_w16.txt* For Vim version 7.1. Last change: 2005 Mar 29
*gui_w16.txt* For Vim version 7.2. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
+2 -2
View File
@@ -1,4 +1,4 @@
*gui_w32.txt* For Vim version 7.1. Last change: 2007 Aug 14
*gui_w32.txt* For Vim version 7.2. Last change: 2007 Aug 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -129,7 +129,7 @@ the makefile by double clicking it and use the "Edit with Vim" entry to edit
the makefile.
You can select any files and right-click to see a menu option called "Edit
with gvim". Chosing this menu option will invoke gvim with the file you have
with gvim". Choosing this menu option will invoke gvim with the file you have
selected. If you select multiple files, you will find two gvim-related menu
options:
"Edit with multiple gvims" -- one gvim for each file in the selection
+2 -2
View File
@@ -1,4 +1,4 @@
*gui_x11.txt* For Vim version 7.1. Last change: 2006 Jul 12
*gui_x11.txt* For Vim version 7.2. Last change: 2007 Dec 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -434,7 +434,7 @@ means in detail:
- The session file is stored to a separate directory (usually $HOME/.gnome2).
- 'sessionoptions' is ignored, and a hardcoded set of appropriate flags is
used instead: >
blank,curdir,folds,globals,help,options,winsize
blank,curdir,folds,globals,help,options,tabpages,winsize
- The internal variable |v:this_session| is not changed when storing the
session. Also, it is restored to its old value when logging in again.
+1 -1
View File
@@ -1,4 +1,4 @@
*hangulin.txt* For Vim version 7.1. Last change: 2006 Apr 02
*hangulin.txt* For Vim version 7.2. Last change: 2006 Apr 02
VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam
+3 -6
View File
@@ -1,4 +1,4 @@
*hebrew.txt* For Vim version 7.1. Last change: 2003 May 11
*hebrew.txt* For Vim version 7.2. Last change: 2007 Jun 14
VIM REFERENCE MANUAL by Ron Aaron (and Avner Lottem)
@@ -7,11 +7,8 @@
Hebrew Language support (options & mapping) for Vim *hebrew*
The supporting 'rightleft' functionality was originally created by Avner
Lottem:
E-mail: alottem@iil.intel.com
Phone: +972-4-8307322
Ron Aaron <ron@ronware.org> is currently helping support these features.
Lottem. <alottem at gmail dot com> Ron Aaron <ron at ronware dot org> is
currently helping support these features.
{Vi does not have any of these commands}
+3 -3
View File
@@ -1,4 +1,4 @@
*help.txt* For Vim version 7.1. Last change: 2006 Nov 07
*help.txt* For Vim version 7.2. Last change: 2008 Jul 21
VIM - main help file
k
@@ -126,7 +126,7 @@ Advanced editing ~
|tabpage.txt| commands for using multiple tab pages
|syntax.txt| syntax highlighting
|spell.txt| spell checking
|diff.txt| working with two or three versions of the same file
|diff.txt| working with two to four versions of the same file
|autocmd.txt| automatically executing commands on an event
|filetype.txt| settings done specifically for a type of file
|eval.txt| expression evaluation, conditional commands
@@ -143,7 +143,7 @@ Special issues ~
|farsi.txt| Farsi (Persian) editing
|hebrew.txt| Hebrew language support and editing
|russian.txt| Russian language support and editing
|ada.txt| Ada (the programming language) support
|ft_ada.txt| Ada (the programming language) support
|hangulin.txt| Hangul (Korean) input mode
|rileft.txt| right-to-left editing mode
+1 -1
View File
@@ -1,4 +1,4 @@
*howto.txt* For Vim version 7.1. Last change: 2006 Apr 02
*howto.txt* For Vim version 7.2. Last change: 2006 Apr 02
VIM REFERENCE MANUAL by Bram Moolenaar
+1 -1
View File
@@ -1,4 +1,4 @@
*if_cscop.txt* For Vim version 7.1. Last change: 2005 Mar 29
*if_cscop.txt* For Vim version 7.2. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Andy Kahn
+3 -3
View File
@@ -1,4 +1,4 @@
*if_mzsch.txt* For Vim version 7.1. Last change: 2007 May 03
*if_mzsch.txt* For Vim version 7.2. Last change: 2008 Jun 28
VIM REFERENCE MANUAL by Sergey Khorev
@@ -55,7 +55,7 @@ In the case of :mzscheme, the code to execute is in the command-line.
In the case of :mzfile, the code to execute is the contents of the given file.
Each buffer has its own MzScheme namespace. Global namespace is bound to
the `global-namespace' value from the 'vimext' module.
the "global-namespace" value from the 'vimext' module.
MzScheme interface defines exception exn:vim, derived from exn.
It is raised for various Vim errors.
@@ -218,7 +218,7 @@ Buffers *mzscheme-buffer*
{linenr}. If {linenr} is 0, lines will be
inserted at start.
(curr-buff) Get the current buffer. Use procedures
from `vimcmd' module to change it.
from "vimcmd" module to change it.
(buff-count) Get count of total buffers in the editor.
(get-next-buff [buffer]) Get next buffer.
(get-prev-buff [buffer]) Get previous buffer. Return #f when there
+1 -1
View File
@@ -1,4 +1,4 @@
*if_ole.txt* For Vim version 7.1. Last change: 2007 May 10
*if_ole.txt* For Vim version 7.2. Last change: 2007 May 10
VIM REFERENCE MANUAL by Paul Moore
+1 -1
View File
@@ -1,4 +1,4 @@
*if_perl.txt* For Vim version 7.1. Last change: 2006 Mar 06
*if_perl.txt* For Vim version 7.2. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Sven Verdoolaege
+1 -1
View File
@@ -1,4 +1,4 @@
*if_pyth.txt* For Vim version 7.1. Last change: 2006 Apr 30
*if_pyth.txt* For Vim version 7.2. Last change: 2006 Apr 30
VIM REFERENCE MANUAL by Paul Moore
+1 -1
View File
@@ -1,4 +1,4 @@
*if_ruby.txt* For Vim version 7.1. Last change: 2006 Apr 30
*if_ruby.txt* For Vim version 7.2. Last change: 2006 Apr 30
VIM REFERENCE MANUAL by Shugo Maeda
+1 -1
View File
@@ -1,4 +1,4 @@
*if_sniff.txt* For Vim version 7.1. Last change: 2005 Mar 29
*if_sniff.txt* For Vim version 7.2. Last change: 2005 Mar 29
VIM REFERENCE MANUAL
+2 -2
View File
@@ -1,4 +1,4 @@
*if_tcl.txt* For Vim version 7.1. Last change: 2006 Mar 06
*if_tcl.txt* For Vim version 7.2. Last change: 2008 Jun 26
VIM REFERENCE MANUAL by Ingo Wilken
@@ -407,7 +407,7 @@ Options:
< See |tcl-window-cmds| for the available options.
$buf command [-quiet] {cmd} *tcl-buffer-command*
$buf expr {exr} *tcl-buffer-expr*
$buf expr {expr} *tcl-buffer-expr*
$buf option {opt} [val] *tcl-buffer-option*
These are similar to "::vim::command" etc., except that everything is
done in the context of the buffer represented by $buf, instead of the
+199 -10
View File
@@ -1,4 +1,4 @@
*indent.txt* For Vim version 7.1. Last change: 2007 May 11
*indent.txt* For Vim version 7.2. Last change: 2008 Jul 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -6,22 +6,27 @@
This file is about indenting C programs and other files.
1. Indenting C programs |C-indenting|
1. Indenting C style programs |C-indenting|
2. Indenting by expression |indent-expression|
==============================================================================
1. Indenting C programs *C-indenting*
1. Indenting C style programs *C-indenting*
The basics for C indenting are explained in section |30.2| of the user manual.
The basics for C style indenting are explained in section |30.2| of the user
manual.
Vim has options for automatically indenting C program files. These options
affect only the indent and do not perform other formatting. For comment
formatting, see |format-comments|.
Vim has options for automatically indenting C style program files. Many
programming languages including Java and C++ follow very closely the
formatting conventions established with C. These options affect only the
indent and do not perform other formatting. There are additional options that
affect other kinds of formatting as well as indenting, see |format-comments|,
|fo-table|, |gq| and |formatting| for the main ones.
Note that this will not work when the |+smartindent| or |+cindent| features
have been disabled at compile time.
There are in fact four methods available for indentation:
There are in fact four main methods available for indentation, each one
overrides the previous if it is enabled, or non-empty for 'indentexpr':
'autoindent' uses the indent from the previous line.
'smartindent' is like 'autoindent' but also recognizes some C syntax to
increase/reduce the indent where appropriate.
@@ -501,11 +506,86 @@ to get do loops indented in .f90 files and left alone in Fortran files with
other extensions such as .for.
PHP *ft-php-indent* *php-indent* *php-indenting*
NOTE: PHP files will be indented correctly only if PHP |syntax| is active.
If you are editing a file in Unix 'fileformat' and '\r' characters are present
before new lines, indentation won't proceed correctly ; you have to remove
those useless characters first with a command like: >
:%s /\r$//g
Or, you can simply |:let| the variable PHP_removeCRwhenUnix to 1 and the
script will silently remove them when Vim loads a PHP file (at each|BufRead|).
OPTIONS: ~
PHP indenting can be altered in several ways by modifying the values of some
variables:
*php-comment*
To not enable auto-formating of comments by default (if you want to use your
own 'formatoptions'): >
:let g:PHP_autoformatcomment = 0
Else, 't' will be removed from the 'formatoptions' string and "qrowcb" will be
added, see|fo-table|for more information.
-------------
To add an extra indent to every PHP lines with N being the number of
'shiftwidth' to add: >
:let g:PHP_default_indenting = N
For example, with N = 1, this will give:
>
<?php
if (!isset($History_lst_sel))
if (!isset($History_lst_sel))
if (!isset($History_lst_sel)) {
$History_lst_sel=0;
} else
$foo="bar";
$command_hist = TRUE;
?>
(Notice the extra indent between the PHP container markers and the code)
-------------
To automatically remove '\r' characters when the 'fileformat' is set to Unix: >
:let g:PHP_removeCRwhenUnix = 1
-------------
To indent braces at the same level than the code they contain: >
:let g:PHP_BracesAtCodeLevel = 1
This will give the following result: >
if ($foo)
{
foo();
}
Instead of: >
if ($foo)
{
foo();
}
NOTE: Indenting will be a bit slower if this option is used because some
optimizations won't be available.
-------------
To indent 'case:' and 'default:' statements in switch() blocks: >
:let g:PHP_vintage_case_default_indent = 1
(By default they are indented at the same level than the 'switch()' to avoid
unnecessary indentation)
PYTHON *ft-python-indent*
The amount of indent can be set for the following situations. The examples
given are de the defaults. Note that the variables are set to an expression,
so that you can change the value of 'shiftwidth' later.
given are the defaults. Note that the variables are set to an expression, so
that you can change the value of 'shiftwidth' later.
Indent after an open paren: >
let g:pyindent_open_paren = '&sw * 2'
@@ -572,6 +652,115 @@ In addition, you can turn the verbose mode for debug issue: >
Make sure to do ":set cmdheight=2" first to allow the display of the message.
VHDL *ft-vhdl-indent*
Alignment of generic/port mapping statements are performed by default. This
causes the following alignment example: >
ENTITY sync IS
PORT (
clk : IN STD_LOGIC;
reset_n : IN STD_LOGIC;
data_input : IN STD_LOGIC;
data_out : OUT STD_LOGIC
);
END ENTITY sync;
To turn this off, add >
let g:vhdl_indent_genportmap = 0
to the .vimrc file, which causes the previous alignment example to change: >
ENTITY sync IS
PORT (
clk : IN STD_LOGIC;
reset_n : IN STD_LOGIC;
data_input : IN STD_LOGIC;
data_out : OUT STD_LOGIC
);
END ENTITY sync;
----------------------------------------
Alignment of right-hand side assignment "<=" statements are performed by
default. This causes the following alignment example: >
sig_out <= (bus_a(1) AND
(sig_b OR sig_c)) OR
(bus_a(0) AND sig_d);
To turn this off, add >
let g:vhdl_indent_rhsassign = 0
to the .vimrc file, which causes the previous alignment example to change: >
sig_out <= (bus_a(1) AND
(sig_b OR sig_c)) OR
(bus_a(0) AND sig_d);
----------------------------------------
Full-line comments (lines that begin with "--") are indented to be aligned with
the very previous line's comment, PROVIDED that a whitespace follows after
"--".
For example: >
sig_a <= sig_b; -- start of a comment
-- continuation of the comment
-- more of the same comment
While in Insert mode, after typing "-- " (note the space " "), hitting CTRL-F
will align the current "-- " with the previous line's "--".
If the very previous line does not contain "--", THEN the full-line comment
will be aligned with the start of the next non-blank line that is NOT a
full-line comment.
Indenting the following code: >
sig_c <= sig_d; -- comment 0
-- comment 1
-- comment 2
--debug_code:
--PROCESS(debug_in)
--BEGIN
-- FOR i IN 15 DOWNTO 0 LOOP
-- debug_out(8*i+7 DOWNTO 8*i) <= debug_in(15-i);
-- END LOOP;
--END PROCESS debug_code;
-- comment 3
sig_e <= sig_f; -- comment 4
-- comment 5
results in: >
sig_c <= sig_d; -- comment 0
-- comment 1
-- comment 2
--debug_code:
--PROCESS(debug_in)
--BEGIN
-- FOR i IN 15 DOWNTO 0 LOOP
-- debug_out(8*i+7 DOWNTO 8*i) <= debug_in(15-i);
-- END LOOP;
--END PROCESS debug_code;
-- comment 3
sig_e <= sig_f; -- comment 4
-- comment 5
Notice that "--debug_code:" does not align with "-- comment 2"
because there is no whitespace that follows after "--" in "--debug_code:".
Given the dynamic nature of indenting comments, indenting should be done TWICE.
On the first pass, code will be indented. On the second pass, full-line
comments will be indented according to the correctly indented code.
VIM *ft-vim-indent*
For indenting Vim scripts there is one variable that specifies the amount of
+21 -7
View File
@@ -1,4 +1,4 @@
*index.txt* For Vim version 7.1. Last change: 2007 May 05
*index.txt* For Vim version 7.2. Last change: 2008 May 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -467,6 +467,7 @@ tag command action in Normal mode ~
|v_ab| ab "a block" from "[(" to "])" (with braces)
|v_ap| ap "a paragraph" (with white space)
|v_as| as "a sentence" (with white space)
|v_at| at "a tag block" (with white space)
|v_aw| aw "a word" (with white space)
|v_a{| a{ same as aB
|v_a}| a} same as aB
@@ -484,6 +485,7 @@ tag command action in Normal mode ~
|v_ib| ib "inner block" from "[(" to "])"
|v_ip| ip "inner paragraph"
|v_is| is "inner sentence"
|v_it| it "inner tag block"
|v_iw| iw "inner word"
|v_i{| i{ same as iB
|v_i}| i} same as iB
@@ -874,6 +876,10 @@ tag command note action in Visual mode ~
mode
|v_X| X 2 delete the highlighted lines
|v_Y| Y yank the highlighted lines
|v_aquote| a" extend highlighted area with a double
quoted string
|v_a'| a' extend highlighted area with a single
quoted string
|v_a(| a( same as ab
|v_a)| a) same as ab
|v_a<| a< extend highlighted area with a <> block
@@ -882,9 +888,12 @@ tag command note action in Visual mode ~
|v_aW| aW extend highlighted area with "a WORD"
|v_a[| a[ extend highlighted area with a [] block
|v_a]| a] same as a[
|v_a`| a` extend highlighted area with a backtick
quoted string
|v_ab| ab extend highlighted area with a () block
|v_ap| ap extend highlighted area with a paragraph
|v_as| as extend highlighted area with a sentence
|v_at| at extend highlighted area with a tag block
|v_aw| aw extend highlighted area with "a word"
|v_a{| a{ same as aB
|v_a}| a} same as aB
@@ -895,6 +904,10 @@ tag command note action in Visual mode ~
|v_gq| gq 2 format the highlighted lines
|v_gv| gv exchange current and previous highlighted
area
|v_iquote| i" extend highlighted area with a double
quoted string (without quotes)
|v_i'| i' extend highlighted area with a single
quoted string (without quotes)
|v_i(| i( same as ib
|v_i)| i) same as ib
|v_i<| i< extend highlighted area with inner <> block
@@ -903,9 +916,12 @@ tag command note action in Visual mode ~
|v_iW| iW extend highlighted area with "inner WORD"
|v_i[| i[ extend highlighted area with inner [] block
|v_i]| i] same as i[
|v_i`| i` extend highlighted area with a backtick
quoted string (without the backticks)
|v_ib| ib extend highlighted area with inner () block
|v_ip| ip extend highlighted area with inner paragraph
|v_is| is extend highlighted area with inner sentence
|v_it| it extend highlighted area with inner tag block
|v_iw| iw extend highlighted area with "inner word"
|v_i{| i{ same as iB
|v_i}| i} same as iB
@@ -1289,7 +1305,7 @@ The commands are sorted on the non-optional part of their name.
|:move| :m[ove] move lines
|:mark| :ma[rk] set a mark
|:macation| :maca[ction] send action message
|:macmenukey| :macm[eyequiv] set key equivalent for menu item
|:macmenu| :macm[enu] set Mac specific properties for menu item
|:make| :mak[e] execute external command 'makeprg' and parse
error messages
|:map| :map show or enter a mapping
@@ -1341,16 +1357,14 @@ The commands are sorted on the non-optional part of their name.
|:print| :p[rint] print lines
|:profdel| :profd[el] stop profiling a function or script
|:profile| :prof[ile] profiling functions and scripts
|:promptfind| :pro[mtfind] open GUI dialog for searching
|:promptrepl| :promtr[epl] open GUI dialog for search/replace
|:promptfind| :pro[mptfind] open GUI dialog for searching
|:promptrepl| :promptr[epl] open GUI dialog for search/replace
|:perldo| :perld[o] execute Perl command for each line
|:pop| :po[p] jump to older entry in tag stack
|:popup| :pop[up] popup a menu by name
|:ppop| :pp[op] ":pop" in preview window
|:preserve| :pre[serve] write all text to swap file
|:previous| :prev[ious] go to previous file in argument list
|:promptfind| :pro[mptfind] Search dialog
|:promptrepl| :promptr[epl] Search/Replace dialog
|:psearch| :ps[earch] like ":ijump" but shows match in preview window
|:ptag| :pt[ag] show tag in preview window
|:ptNext| :ptN[ext] |:tNext| in preview window
@@ -1456,7 +1470,7 @@ The commands are sorted on the non-optional part of their name.
|:startinsert| :star[tinsert] start Insert mode
|:startgreplace| :startg[replace] start Virtual Replace mode
|:startreplace| :startr[eplace] start Replace mode
|:stopinsert|| :stopi[nsert] stop Insert mode
|:stopinsert| :stopi[nsert] stop Insert mode
|:stjump| :stj[ump] do ":tjump" and split window
|:stselect| :sts[elect] do ":tselect" and split window
|:sunhide| :sun[hide] same as ":unhide"
+3 -3
View File
@@ -1,4 +1,4 @@
*insert.txt* For Vim version 7.1. Last change: 2007 May 07
*insert.txt* For Vim version 7.2. Last change: 2008 Jun 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -882,12 +882,12 @@ a Vim script.
CTRL-X CTRL-V Guess what kind of item is in front of the cursor and
find the first match for it.
Note: When CTRL-V is mapped you can often use CTRL-Q
instead |i_CTRL-Q|.
instead of |i_CTRL-Q|.
CTRL-V or
CTRL-N Search forwards for next match. This match replaces
the previous one.
CTRL-P Search backward for previous match. This match
CTRL-P Search backwards for previous match. This match
replaces the previous one.
CTRL-X CTRL-V Further use of CTRL-X CTRL-V will do the same as
+18 -23
View File
@@ -1,4 +1,4 @@
*intro.txt* For Vim version 7.1. Last change: 2007 May 07
*intro.txt* For Vim version 7.2. Last change: 2008 Jun 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -120,27 +120,13 @@ NOTE:
*subscribe-maillist*
If you want to join, send a message to
<vim-help@vim.org>
<vim-subscribe@vim.org>
Make sure that your "From:" address is correct. Then the list server will
give you help on how to subscribe.
You can retrieve old messages from the maillist software, and an index of
messages. Ask vim-help for instructions.
Archives are kept at: *maillist-archive*
http://groups.yahoo.com/group/vim
http://groups.yahoo.com/group/vimdev
http://groups.yahoo.com/group/vimannounce
http://groups.yahoo.com/group/vim-multibyte
http://groups.yahoo.com/group/vim-mac
Additional maillists:
<vim-fr@club.voila.fr> *french-maillist*
Vim list in the French language. Subscribe by sending a message to
<vim-fr-subscribe@club.voila.fr>
Or go to http://groups.yahoo.com/group/vim-fr.
*maillist-archive*
For more information and archives look on the Vim maillist page:
http://www.vim.org/maillist.php
Bug reports: *bugs* *bug-reports* *bugreport.vim*
@@ -220,8 +206,9 @@ Vim would never have become what it is now, without the help of these people!
Eric Fischer Mac port, 'cindent', and other improvements
Benji Fisher Answering lots of user questions
Bill Foster Athena GUI port
Google Lets me work on Vim one day a week
Loic Grenie xvim (ideas for multi windows version)
Sven Guckes Vim promotor and previous WWW page maintainer
Sven Guckes Vim promoter and previous WWW page maintainer
Darren Hiebert Exuberant ctags
Jason Hildebrand GTK+ 2 port
Bruce Hunsaker improvements for VMS port
@@ -231,7 +218,7 @@ Vim would never have become what it is now, without the help of these people!
Steve Kirkendall Elvis
Roger Knobbe original port to Windows NT
Sergey Laskavy Vim's help from Moscow
Felix von Leitner Maintainer of Vim Mailing Lists
Felix von Leitner Previous maintainer of Vim Mailing Lists
David Leonard Port of Python extensions to Unix
Avner Lottem Edit in right-to-left windows
Flemming Madsen X11 client-server, various features and patches
@@ -241,6 +228,8 @@ Vim would never have become what it is now, without the help of these people!
Sung-Hyun Nam Work on multi-byte versions
Vince Negri Win32 GUI and generic console enhancements
Steve Oualline Author of the first Vim book |frombook|
Dominique Pelle figuring out valgrind reports and fixes
A.Politz Many bug reports and some fixes
George V. Reilly Win32 port, Win32 GUI start-off
Stephen Riehm bug collector
Stefan Roemer various patches and help to users
@@ -560,7 +549,7 @@ Ex mode Like Command-line mode, but after entering a command
you remain in Ex mode. Very limited editing of the
command line. |Ex-mode|
There are five ADDITIONAL modes. These are variants of the BASIC modes:
There are six ADDITIONAL modes. These are variants of the BASIC modes:
*Operator-pending* *Operator-pending-mode*
Operator-pending mode This is like Normal mode, but after an operator
@@ -574,6 +563,12 @@ Replace mode Replace mode is a special case of Insert mode. You
If the 'showmode' option is on "-- REPLACE --" is
shown at the bottom of the window.
Virtual Replace mode Virtual Replace mode is similar to Replace mode, but
instead of file characters you are replacing screen
real estate. See |Virtual-Replace-mode|.
If the 'showmode' option is on "-- VREPLACE --" is
shown at the bottom of the window.
Insert Normal mode Entered when CTRL-O given in Insert mode. This is
like Normal mode, but after executing one command Vim
returns to Insert mode.
@@ -608,7 +603,7 @@ CTRL-O in Insert mode you get a beep but you are still in Insert mode, type
TO mode ~
Normal Visual Select Insert Replace Cmd-line Ex ~
FROM mode ~
Normal v V ^V *4 *1 R : / ? ! Q
Normal v V ^V *4 *1 R gR : / ? ! Q
Visual *2 ^G c C -- : --
Select *5 ^O ^G *6 -- -- --
Insert <Esc> -- -- <Insert> -- --

Some files were not shown because too many files have changed in this diff Show More