Movatterモバイル変換


[0]ホーム

URL:


Quick links:help overview ·quick reference ·user manual toc ·reference manual toc·faq
Go to keyword (shortcut:k)
Site search (shortcut:s)
os_mac.txt  ForVim version 9.2.  Last change: 2026 Feb 14VIM REFERENCE MANUAL  by Bram Moolenaar et al.macMacmacintoshMacintoshThis file documents the particularities of theMacintosh version of Vim.NOTE: This fileisa bit outdated.  You might find more useful info here:http://macvim.org/1. Filename Conventionmac-filename2..vimrc and .vim filesmac-vimfile3. Standard mappingsmac-standard-mappings4.FAQmac-faq5. Known Lackmac-lack6.Mac Bug Reportmac-bug7. Compiling Vimmac-compile8. The darwin featuremac-darwin-featureThere wasaMac port for version 3.0 of Vim.  Here are the first few linesfrom the old file:VIM ReleaseNotesInitialMacintosh release, VIM version 3.019 October 1994Eric Fischer<enf1@midway.uchicago.edu>, <eric@jcp.uchicago.edu>, <etaoin@uchicago.edu>5759 N. Guilford AveIndianapolis IN 46220 USA==============================================================================1. Filename Conventionmac-filenameStarting withVim version 7 you can just use theunix path separators withVim.  In order to determine if the specified filenameis relative to thecurrent folder or absolute (i.e. relative to the "Desktop"), the followingalgorithmis used:If the path start bya "/", the pathis absoluteIf the path start bya ":", the pathis relativeIf the path doesn't start by neithera "/" nor ":",  anda ":"is found beforea "/" then the pathis absolute:e /HD/text:e HD:textEdit the file "text" of the disk "HD":e :src:main.c:e src/main.cEdit the file "main.c" in the folder "src" in the current folder:e os_mac.cEdit the file "os_mac.c" in the current folder.You can use the$VIM and$VIMRUNTIME  variable.:so $VIMRUNTIME:syntax:syntax.vim==============================================================================2..vimrc and .vim filesmac-vimfileItis recommended to useUnix style line separators for Vim scripts, thusasingle newline character.Whenstarting up Vim will load the $VIMRUNTIME/macmap.vimscript to definedefault command-key mappings.On older systems filesstarting witha dot "." are discouraged, thus the rcfiles are named "vimrc" or "_vimrc" and "gvimrc" or "_gvimrc".  These filescan be in any format (mac,dos or unix).  Vim can handle any file format whenthe'nocompatible' optionis set, otherwiseit will only handlemac formatfiles.==============================================================================3. Standard mappingsmac-standard-mappingsThe following mappings are available for cut/copy/paste from/to clipboard.keyNormalVisual  InsertDescriptionCommand-v"*P"-d"*P<C-R>*paste text<D-v>Command-c"*ycopyVisual text<D-c>Command-x"*dcutVisual text<D-x>Backspace"*dcutVisual text==============================================================================4.MacFAQmac-faqOn the internet:https://github.com/macvim-dev/macvim/wiki/FAQQ:I can't enter non-ASCII character in Apple Terminal.A: Under Window Settings, Emulation, make sure that "Escape non-ASCII   characters"is not checked.Q: HowdoI start theGUI from the command line?A: Assuming that Vim.appis located in /Applications:open /Applications/Vim.app   Or:/Applications/Vim.app/Contents/MacOS/Vim-g{arguments}Q: How canI set $PATH to something reasonable whenI start Vim.app from theGUI or with open?A: The following trick works with most shells.  Putit in yourvimrc file.   Thisis included in the systemvimrc file included with the binaries   distributedat macvim.org.let s:path = system("echo echo VIMPATH'${PATH}' | $SHELL -l")let $PATH = matchstr(s:path, 'VIMPATH\zs.\{-}\ze\n')==============================================================================5.Mac Lackmac-lackInaterminalCTRL-^ needs to be enteredas Shift-Control-6.CTRL-@asShift-Control-2.==============================================================================6.Mac Bug Reportmac-bugWhen reporting anyMac specific bug or feature change, please use thevim-macmaillistvim-mac.  However, you need to be subscribed.  An alternativeis toreport issues either directlyat the Vim github repository:https://github.com/vim/vim/issuesor for MacVim specific issues, you may report those over here:https://github.com/macvim-dev/macvim/issues==============================================================================7. Compiling Vimmac-compileSee the file "src/INSTALLmac.txt" that comes with the source files.==============================================================================8. The Darwin Featuremac-darwin-featureIf you haveaMac that isn't very old, you will be running OS X, also calledDarwin.  The last pre-Darwin OS wasMac OS 9.  The darwin feature makes Vimuse Darwin-specific properties.Whatis accomplished with this featureis two-fold:- Make Vim interoperable with the system clipboard.- Incorporate into Vima converter module that bridges the gap between some  character encodings specific to the platform and those known to Vim.Needless to say, both are not to be missed for any decent text editor to worknicely with other applications running on the same desktop environment.As Vimis not an application dedicated only to macOS, we need an extra featureto add in order forit to offer the same user experience that our users onother platforms enjoy to people on macOS.For brevity, the featureis referred toas "darwin" to signifyit one of theVim features that are specific to that particular platform.The featureisa configuration option.  Accordingly, whetheritis enabled ornotis determinedat build time; onceitis selected to be enabled,itiscompiled in and hence cannot be disabledat runtime.The featureis enabled by default.  For most macOS users, that should besufficient unless they have specific needs mentioned briefly below.If you want to disable it, pass--disable-darwin to the configure script:    ./configure --disable-darwin <other options>and then runmake to build Vim.  The order of theoptions doesn't matter.To make sureat runtime whether or not the darwin featureis compiled in, youcan usehas('osxdarwin') which returns 1 if the featureis compiled in;0otherwise.  For backward compatibility, you can still usemacunix instead ofosxdarwin.Notable use cases where--disable-darwinis turned out to be useful are:- When you want to usex11-selection instead of the system clipboard.- When you want to usex11-clientserver.Since both have to make use ofX11 inter-client communication for them to workproperly, and since the communication mechanism can come into conflict withthe system clipboard, the darwin feature should be disabled to prevent Vimfrom hangingat runtime. vim:tw=78:ts=8:noet:ft=help:norl:

Quick links:help overview ·quick reference ·user manual toc ·reference manual toc·faq


[8]ページ先頭

©2009-2026 Movatter.jp