This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) シェル内で | |
$ wget -O rails.zip "http://www.vim.org/scripts/download_script.php?src_id=13800" | |
$ unzip rails.zip -d ~/.vim/ | |
2) ~/.vimrc内で | |
set runtimepath+=~/.vim/rails | |
を記載。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:RangePython() range | |
let selected_lines = getbufline('%', line("'<"), line("'>")) | |
let cmd = 'python hoge.py' | |
let lines = split(system(cmd, join(selected_lines, "\n")), "\n") | |
call append('.', lines) | |
endfunction | |
command! -range RangePython :call <sid>RangePython() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:hoge(str, n) abort | |
let begin = len(a:str) % a:n | |
return (begin is 0 ? [] : [a:str[:begin-1]]) + split(a:str[(begin):], repeat('.', a:n) . '\zs') | |
endfunction | |
echo s:hoge('1234', 3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$brew install macvim | |
==> Downloading https://github.com/b4winckler/macvim/archive/snapshot-73.tar.gz | |
Already downloaded: /Library/Caches/Homebrew/macvim-7.4-73.tar.gz | |
==> ./configure --with-features=huge --enable-multibyte --with-macarchs=x86_64 - | |
==> make | |
==> Caveats | |
.app bundles were installed. | |
Run `brew linkapps` to symlink these to /Applications. | |
==> Summary | |
🍺 /usr/local/Cellar/macvim/7.4-73: 1810 files, 28M, built in 45 seconds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nyagos.completion_hook = function (c) | |
local bs = { | |
"submodules", | |
"add", | |
}; | |
if c.text:match('^git ') then | |
for b in nyagos.eval('git branch'):gmatch('[^ \n*>-/]+') do | |
table.insert(bs, b); | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:str2nr(str, base) abort | |
let xs = map(range(0x30, 0x39) + range(0x41, 0x5A), 'nr2char(v:val)') | |
let n = 0 | |
let total = 0 | |
if a:base == 1 | |
return len(a:str) - 1 | |
else | |
for c in reverse(split(a:str, '\zs')) | |
let total += index(xs, c) * pow(a:base, n) | |
let n += 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let s:save_cpo = &cpo | |
set cpo&vim | |
function! Matcher(path) | |
let fromLinkTagList = [] | |
let toLinkTagList = [] | |
for line in readfile(a:path) | |
call add(fromLinkTagList, matchstr(line,'|\zs\S\{-}\ze|')) | |
call add(toLinkTagList, matchstr(line,'\*\zs\S\{-}\ze\*')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set runtimepath+=~/Dropbox/vim-modules/dart-vim-plugin | |
set runtimepath+=~/Dropbox/vim-modules/vim-operator-user | |
set runtimepath+=~/Dropbox/vim-modules/vim-operator-replace | |
set runtimepath+=~/Dropbox/vim-modules/vim-csharp | |
set runtimepath+=~/Dropbox/vim-modules/vim-gitdiff | |
set runtimepath+=~/Dropbox/vim-modules/vim-next-reading-vimrc | |
set runtimepath+=~/Dropbox/vim-modules/vim-powershell | |
set runtimepath+=~/Dropbox/vim-modules/badwolf | |
set runtimepath+=~/Dropbox/vim-modules/vim-qfreplace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! Hoge() abort | |
let lines = [] | |
for row in range(1, 999) | |
let line = '' | |
for col in range(1, &columns) | |
let c = screenchar(row, col) | |
if 0 < c | |
let line .= nr2char(c) | |
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mingw32-make.exe: Entering directory 'C:/Users/naru1/vim/src' | |
windres --preprocessor="gcc -E -xc" -DRC_INVOKED -DWIN32 -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 -DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_GETTEXT -DHAVE_LOCALE_H -DDYNAMIC_GETTEXT -DFEAT_CSCOPE -DFEAT_JOB_CHANNEL -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV \ | |
--input-format=rc --output-format=coff -i vim.rc -o obji386/vimrc.o | |
c:\MinGW\bin\windres.exe: vim.rc:1: syntax error | |
プロセスが、存在しないパイプに書き込もうとしました。 | |
vim.rc:17:0: fatal error: when writing output to : Invalid argument | |
// #else | |
^ | |
compilation terminated. | |
c:\MinGW\bin\windres.exe: preprocessing failed. |