Skip to content

Instantly share code, notes, and snippets.

View othree's full-sized avatar
:accessibility:
On the way to refactoring

othree othree

:accessibility:
On the way to refactoring
View GitHub Profile
@othree
othree / cos.vim
Last active December 18, 2015 03:49
cos
fun! Coscup()
let w = winwidth(0) - 5
let h = winheight(0) - 1
let rowstr = repeat(' ', w/2) . '|' . repeat(' ', w/2)
let rowstr0 = repeat('-', w/2) . '+' . repeat('-', w/2)
exe "normal ggdG"
exe "normal i" . rowstr
for i in range(1, h)
let i = i + 1
{
"no_tabs": {
"level": "error",
"message": "Line contains tab indentation"
},
"no_trailing_whitespace": {
"level": "ignore",
"message": "Line ends with trailing whitespace"
},
"max_line_length": {
var s1 = Math.sin(Math.PI*0.4),
s2 = Math.sin(Math.PI*0.8),
c1 = Math.cos(Math.PI*0.4),
c2 = Math.cos(Math.PI*0.2),
L = 1500,
one = 1500 / (s1*2),
a = one*s2*2;
console.log([
[one*s1, one*(1+c2)],
@othree
othree / .vimrc
Last active December 19, 2015 08:19
let &t_8f="^[[38;2;%lu;%lu;%lum"
let &t_8b="^[[48;2;%lu;%lu;%lum"
hg clone https://bitbucket.org/ZyX_I/vim
cd vim
hg update 24-bit-xterm
cd src && make autoconf && cd ..
./configure \
--enable-gui=no \
--without-x \
--enable-multibyte \
--with-tlib=ncurses \
defaults write com.apple.screencapture disable-shadow -bool true
killall SystemUIServer

JavaScript 品質工具:CodePaint 與 Plato

介紹協助提昇 F2E Code Style 的兩個工具。

分享者

josephj@faria

問題

let behavs = { 'javascript': [], 'html': [] }
call add(behavs.javascript, {
\ 'command' : "\<C-x>\<C-u>",
\ 'completefunc' : 'acp#completeSnipmate',
\ 'meets' : 'acp#meetsForSnipmate',
\ 'onPopupClose' : 'acp#onPopupCloseSnipmate',
\ 'repeat' : 0,
\})
call add(behavs.javascript, {
\ 'command' : g:acp_behaviorKeywordCommand,
@othree
othree / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console