![vim brew macports vim brew macports](https://images.thoughtbot.com/blog-vellum-image-uploads/dm8SPoozQAbH8LZYX4O4_beetlejuice.jpg)
Ln -s /System/Library/Frameworks/amework/Versions/2.5 /System/Library/Frameworks/amework/Versions/Currentĩ9. 使用以下命令Ĭd /System/Library/Frameworks/amework/Versions/ 或者通过 git 取得 源码: git clone git://repo.or.cz/MacVim.git vim7
#VIM BREW MACPORTS INSTALL#
再执行一下命令安装vim: sudo port install vim +python +ruby 3.编译 macvim configure -with-features=huge -enable-cscope -enable-pythoninterp -enable-rubyinterp -enable-perlinterp -enable-tclinterp -enable-multibyte -enable-cscope -disable-gui
#VIM BREW MACPORTS MAC OS#
mac os system install vim with python support: + is only for number, operators will be corĢ. : "a:arg = 10 " error, assignment to arg is disallowed.ĥ. *a:1 = a:000*Ī:000 is the whole argument list, which can be print with echo only other than echom. Output: a:0 = 2, which means the number of arguments you were given.Ī:1 = "a", which is the first argument. Then :echo Funr() will show func, it's a explicit return value. > :echo Fun() will output "fun" and 0, the 0 means default return value of a function(who doesn't return a value explicit) is 0. See :help ignorecase and noignorecase, :help expr4 =# is case-sensitive, =? is case-insensitive, both of them will ignore the setting of comparison operator like (&ignorecase) numbers comparison use >, string comparison don't use =, use =#, =?, because = is depends on user's settings. "hello10" + 10 = 10, "10hello" + 10 = 20 (string begins with number will convert to that number in an arithmetic expression.) if "astring" = if 0 ("string" as a boolean equals to false.)ġ. See :help internal-variables to learn more.ġ. vimrc when `set` is suffice, because `let` is harder to read.ġ.
![vim brew macports vim brew macports](https://user-images.githubusercontent.com/47246332/185739715-32c5d992-3a22-4d55-b220-fcab7f29c7ca.png)
You can change the search behaviour by changing the value in `/` register.ĥ. use `/` to search a word, then :echo will show the word in message window, `/` is search register. yank a word, and :echo will show the word in message window, `"` is default yank register.ģ. or :echo messages window will shows "hello"Ģ. :let then `"ap` will paste "hello" to editor. :let &l:number=0 = Local Option as a variable. Notice `wrap` is a boolean, 0 menas false, otherwise means true.ģ. :let &wrap = 1 = Option `wrap` as a variable. :let x = 10 | :echo x = define a variable name x. Type `cih`, vim will change title of markdown both = or - are supported.ġ. :onoremap ih : execute "normal! ?^\\+$\r:nohlsearch\rkvg_" `execute`: execute the string as a vim command script.Ģ. Type `cih`, vim will change title of markdown file. :onoremap ih : execute "normal! ?^=\\+$\r:nohlsearch\rkvg_" :autocmd FileType javascript :iabbrev iff if() = remember to use augroupġ. :autocmd FileType python :iabbrev iff if: = remember to use augroup. `abbrev` will pay attention to the characters before and after the target.Ĥ. `map` cannot take context into account when replace the target. :iabbrev adn and, :iabbrev taht that, :iabbrev why not use `map` ? Vim will substitute `non-keyword` characters. :onoremap il( : normal! F)vi( = select last parentheses :onoremap in( : normal! f(vi( = will select the content in next pair of parenthesesĮ.g.: void func(int & hello) put cursor somewhere in the word void, and type `cin(`, it will delete the content in the parentheses, and place you in insert mode between them.
![vim brew macports vim brew macports](http://www.itmeyer.at/umlet/imgdiag/sequencediagram.gif)
Put cursor in i, and press db, will delete lines until return. :onoremap b /return = notice used like inoremap, nnoremap and vnoremap. :onoremap p i( = cp will be same with ci(, that is cp will change content in parentheses and dp will be same with di(.Ģ. Setl : (no parameter) show local settings that different its default value.ġ. if it uses a global value, there will be – before the option. When you type Q, first Q will take effect, because is more specific than no.