This file contains hidden or 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
#!/usr/bin/env python | |
# | |
# Copyright (C) 2013 Stanislav Golovanov <[email protected]> | |
# Strahinja Val Markovic <[email protected]> | |
# | |
# This file is part of YouCompleteMe. | |
# | |
# YouCompleteMe is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or |
This file contains hidden or 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
# HG changeset patch | |
# Parent 4607612d49e69b4e748b23ce64a75c0d2b56e4ca | |
diff -r 4607612d49e6 -r 229abb12ec23 src/if_py_both.h | |
--- a/src/if_py_both.h Mon Jun 24 09:50:40 2013 +0900 | |
+++ b/src/if_py_both.h Mon Jun 24 10:07:44 2013 +0900 | |
@@ -139,13 +139,15 @@ | |
} | |
else | |
{ | |
+#if PY_MAJOR_VERSION < 3 |
This file contains hidden or 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
" <C-s> で値トグル | |
" ---------------- | |
function! s:toggle_value() | |
let pos = getpos('.') | |
let col = pos[2] | |
let line = getline('.') | |
if line[col-1] !~# '\i' | return | endif | |
let left = match(line, '\i*\%'.col.'c\i*') | |
let right = matchend(line, '\i\+', left-1) |
This file contains hidden or 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
" Foldされた領域をプレビューする {{{2 | |
" ------------------------------ | |
function! MyBalloonExpr() | |
let lnum = foldclosed(v:beval_lnum) | |
if lnum == -1 | |
return '' | |
endif | |
let lines = getline(lnum, foldclosedend(lnum)) | |
return iconv(join(len(lines) > &lines ? lines[:&lines] : lines, "\n"), |
This file contains hidden or 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
" :messages をヤンクする {{{2 | |
function! s:yank_message(count, register) | |
redir => messages | |
silent messages | |
redir END | |
call setreg(a:register, split(messages, '\n')[-1 * a:count]) | |
echo 'Yank "' . getreg(a:register) . '"' | |
if !empty(a:register) | |
echon ' into register' a:register | |
endif |
This file contains hidden or 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
git config --global alias.graph "log --decorate --graph --oneline" |
This file contains hidden or 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
" indent | |
set vsvim_useeditordefaults | |
" Options | |
set backspace=start | |
set clipboard=unnamed | |
set ignorecase | |
set incsearch | |
set hlsearch | |
set visualbell |
This file contains hidden or 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行以内の編集でも quote1 ~ quote9 に保存 | |
" ----------------------------------------- | |
function! s:update_numbered_registers() | |
let reg = getreg('"') | |
if len(split(reg, '\n')) == 1 && reg != getreg(1) | |
for i in range(9, 2, -1) | |
call setreg(i, getreg(i-1)) | |
endfor | |
call setreg(1, reg) |
This file contains hidden or 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
import vim | |
import re | |
import os | |
import os.path | |
import fnmatch | |
custom_ignore = vim.eval('g:ctrlp_custom_ignore') | |
if custom_ignore['dir'][:2] == '\\v': | |
custom_ignore['dir'] = custom_ignore['dir'][2 :] | |
if custom_ignore['file'][:2] == '\\v': |