This is a fairly common question, and there isn't a One True Answer.
These are the most common techniques:
" Vim global plugin for automatin response to swapfiles (from autoswap_mac.vim from Damian Conway) | |
" Last Change: 2013 Dec 25 | |
" Maintainer: Constantin Runge <[email protected]> | |
" License: other | |
if exists("loaded_autoswap") | |
finish | |
endif | |
let loaded_autoswap = 1 |
" Vim global plugin for automating response to swapfiles | |
" Maintainer: Damian Conway | |
" License: This file is placed in the public domain. | |
"############################################################# | |
"## ## | |
"## Note that this plugin only works for Vim sessions ## | |
"## running in Terminal on MacOS X. And only if your ## | |
"## Vim configuration includes: ## | |
"## ## |
#!/usr/bin/env bash | |
mcdir="$HOME/.minecraft" | |
downloader="wget --no-check-certificate -q -O" | |
os="linux" | |
natives="libjinput-linux libjinput-linux64 liblwjgl liblwjgl64 libopenal libopenal64" | |
echo "Determining installed LWJGL version..." | |
installed="$(unzip -p $mcdir/bin/lwjgl.jar | strings | grep '^[0-9]*\.[0-9]*\.[0-9]*')" | |
echo "LWJGL $installed installed" |
Index: parsers.h | |
=================================================================== | |
--- parsers.h (revision 781) | |
+++ parsers.h (working copy) | |
@@ -26,11 +26,14 @@ | |
CppParser, \ | |
CsharpParser, \ | |
CobolParser, \ | |
+ DParser, \ | |
DosBatchParser, \ |
#!/usr/bin/env bash | |
echo "Determining OS..." | |
if [[ "$(uname -s)" == "Linux" ]]; then | |
mcdir="$HOME/.minecraft/" | |
downloader="wget --no-check-certificate -q -O" | |
os="linux" | |
natives="libjinput-linux libjinput-linux64 liblwjgl liblwjgl64 libopenal libopenal64" | |
elif [[ "$(uname -s)" == "Darwin" ]]; then |
inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a | |
function! s:align() | |
let p = '^\s*|\s.*\s|\s*$' | |
if exists(':Tabularize') && getline('.') =~# '^\s*|' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p) | |
let column = strlen(substitute(getline('.')[0:col('.')],'[^|]','','g')) | |
let position = strlen(matchstr(getline('.')[0:col('.')],'.*|\s*\zs.*')) | |
Tabularize/|/l1 | |
normal! 0 | |
call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.')) |