Now, let's add some cool DX plugins (let me know if I am missing some) General Developer Experience (DX) Plugins I'll demonstrate and put the code here using the package path and with Vim-Plug, but if you like another plugin manager, it's usually pretty simple to move from one to the other, they usually use the same pattern:Įnter fullscreen mode Exit fullscreen mode
#Macvim code completion mac#
Since vim 8, there's a /pack/ (think backslashes for Windows) directory in your vim files ( ~/.vim/ for linux and Mac OS, ~\vimfiles\ for Windows) where you can clone, submodule, or simply copy plugins that will be loaded on vim startup. With vim 7.4, there was some tuning to do to manage the runtime path, that's why there are a bunch of plugin managers out there, like the minimalistic, solid vim-pathogen by Tim Pope (again!), vundle, then asynchronous and fast dein, and my favorite Vim-Plug. + let has_slash = match(substr, '\/') != -1 " position of slash, if anyĬheck out :help ins-completion for a list of completion commands. + let has_period = match(substr, '\.') != -1 " position of period, if any + if (strlen(substr)=0) " nothing to match on empty string + let substr = matchstr(substr, "*$") " word till cursor + let substr = strpart(line, -1, col('.')+1) " from the start of the current With that done, we now have autocompletion working with ctrl+n in insert mode.Īnd now some built in language support with omnifunc with ctrl-x ctrl-o (not very user-friendly), as in the 0.2.1 tag:Ī trick for tab completion is to add a smart function like below, you can also find it in the 0.2.2 tag:
+" vim: set sw=4 ts=4 sts=4 et tw=78 foldmarker= foldlevel=0 foldmethod=marker spell: Highlighting, tab settings, remap the leader key, and functions to know which OS we're using. Now some options of my own blend or gotten from some good. You can check out the vimrc generated by user-setup
Setglobal tags-=./tags tags-=./tags tags^=./tags Set formatoptions+=j " Delete comment character when joining commented lines If &encoding =# 'latin1' & has('gui_running') Nnoremap :nohlsearch=has('diff')?'diffupdate':'' " Use to clear the highlighting of :set hlsearch. " Use :help 'option' to see the documentation for the given option. If has('syntax') & !exists('g:syntax_on') If exists('g:loaded_sensible') || &compatible " sensible.vim - Defaults everyone can agree on vimrc file with some basic configuration we need.Īs a base, we'll take the content of Tim Pope's vim-sensible plugin You can apply the diffs in this post by copying them in a file, let's say example.patch, and apply them, as long as you have the same directory structure as in my GitHub repository, and run $ git apply example.patch.