Skip to content

Instantly share code, notes, and snippets.

@sgur
sgur / neosnippet_completer.py
Created June 18, 2013 17:59
neosnippet_completer.py
#!/usr/bin/env python
#
# Copyright (C) 2013 Stanislav Golovanov <stgolovanov@gmail.com>
# Strahinja Val Markovic <val@markovic.io>
#
# 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
@sgur
sgur / general_completer_store.py
Created June 18, 2013 17:59
general_completer_store.py
#!/usr/bin/env python
#
# Copyright (C) 2013 Stanislav Golovanov <stgolovanov@gmail.com>
# Strahinja Val Markovic <val@markovic.io>
#
# 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
@sgur
sgur / HowToChange Density.md
Last active February 16, 2017 01:39
5.2 インチ LCD の端末で Nexus 5X の表示感に近づける

標準の density は 480 なので、5.2 インチLCDではステータスエリア等が大きく感じられる。

adb shell dumpsys display | grep density

で、現在の density の値を確認する。

wm density コマンドを利用して調整する

細かいのがよければ

@sgur
sgur / HowToBuildVim.md
Last active February 10, 2017 06:16
How to build Vim on MinGW64/BashOnWindows

Vim をビルドするためのメモ

(注意) : https://github.com/sgur/vim-kaoriya-patches が guilt で適用されている前提

最新のソースコードに guilt のパッチを適用しなおす

git fetch
guilt pop -a ; git merge --ff-only ; guilt push -a
@sgur
sgur / screen.c.diff
Created January 25, 2017 08:46
git diff src/screen.c
diff --git a/src/screen.c b/src/screen.c
index 6b4b8279a..4cf6f7824 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -4547,7 +4547,11 @@ win_line(
/*
* Found last space before word: check for line break.
*/
- if (wp->w_p_lbr && vim_isbreak(c) && !vim_isbreak(*ptr))
+ if (wp->w_p_lbr
@sgur
sgur / vimrc_clpum.vim
Last active June 30, 2016 09:33
Vim configuration for CLPUM
if has('clpum')
cnoremap <expr> <C-g> <SID>key_descend()
cnoremap <expr> <C-w> <SID>key_ascend()
function! s:key_descend() abort "{{{
if clpumvisible()
call feedkeys("\<Right>", "t")
return ""
endif
return "\<C-g>"
endfunction "}}}
@sgur
sgur / test.vim
Created June 29, 2016 05:59
An example for Vim w/ CLPUM
scriptencoding utf-8
function! EchoComplete(arglead, cmdline, cursorpos) abort "{{{
return ['a', 'b', 'c']
endfunction "}}}
function! EchoTest() abort "{{{
let name = input(':echo ', '', 'customlist,EchoComplete')
redraw
execute "echo" string(name)
@sgur
sgur / commandlinefu.vim
Last active March 3, 2016 07:50
commandlinefu.com から検索してきて quickfix や previewwindow で表示する
" Description:
" commandlinefu.com から利用例を検索し previewwindow か quickfix に放流する
" Requirement:
" - webapi-vim <https://github.com/mattn/webapi-vim>
" - http://... で始まる URL を edit できるプラグイン (ex. netrw)
" Usage:
" :CmdFuPreviewUsing {cmd}
" {cmd} を利用した例を取得し previewwindow に表示
" :CmdFuQuickfixUsing {cmd}
" {cmd} を利用した例を取得し quickfix に表示
augroup ft_markdown_syntax
autocmd!
autocmd FileType markdown
\ let g:markdown_fenced_languages = uniq(sort(map(filter(getline(1, '$'), 'v:val =~# "^```\\k"'), 'matchstr(v:val, "^```\\zs\\k\\+$")')))
augroup END
#!/usr/bin/env python
#
# Copyright (C) 2011, 2012 Strahinja Val Markovic <val@markovic.io>
#
# 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
# (at your option) any later version.