https://ja.wikipedia.org/wiki/JavaScript_Object_Notation
- Python標準に含まれている
- 仕様が厳格に決まっている
| snippet import | |
| alias imp | |
| abbr import ... | |
| options head | |
| import ${0:#:module} | |
| snippet from | |
| abbr from ... import ... | |
| options head | |
| from ${1:#:package} import ${0:#:module} |
| from os import path | |
| print(path.relpath('/a/b', '/a')) # >>> b | |
| print(path.relpath('/a', '/a/b')) # >>> .. | |
| from pathlib import Path | |
| a = Path('/a') | |
| b = Path('/a/b') | |
| print(b.relative_to(a)) # >>> b |
| #!/usr/bin/env bash | |
| remove() { | |
| if [ -e $1 ]; then | |
| rm -rf $1 | |
| fi | |
| } | |
| remove c | |
| echo "c (not optimized) compile" |
| asdfasdf. asdf | |
| asdfasdf. asdf | |
| asdfasdf. asdf | |
| asdfasdf. asdf | |
| asdfasdf. asdf | |
| asdfasdf. asdf | |
| asdfasdf. asdf | |
| asdfasdf asdf | |
| asdfasdf asdf | |
| asdfasdf asdf |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from os import path, environ | |
| from subprocess import check_output, call | |
| from shlex import split | |
| from codecs import open | |
| home_dir = environ['HOME'] | |
| python_path = u''' |
| nim js -o:hellonim.js hellonim.nim |
| #!/usr/bin/env python3 | |
| import os | |
| import shutil | |
| # コピーしたいディレクトリにいること | |
| # os.getcwd() とか ipythonからならpwdでパス確認できる | |
| # 違うディレクトリにいたら移動するなりソース修正するなり | |
| dstdir = 'コピー先のディレクトリのフルパス' | |
| files = os.listdir() | |
| num_files = len(files) # 進捗表示用 |
https://ja.wikipedia.org/wiki/JavaScript_Object_Notation
| if executable('fcitx-remote') | |
| autocmd InsertLeave * call system('fcitx-remote -c') | |
| else | |
| autocmd InsertLeave * set iminsert=0 | |
| endif |
| diff --git a/jedi/parser/grammar3.4.txt b/jedi/parser/grammar3.4.txt | |
| index d4a32b8..45f733f 100644 | |
| --- a/jedi/parser/grammar3.4.txt | |
| +++ b/jedi/parser/grammar3.4.txt | |
| @@ -27,7 +27,8 @@ parameters: '(' [typedargslist] ')' | |
| typedargslist: (tfpdef ['=' test] (',' tfpdef ['=' test])* [',' | |
| ['*' [tfpdef] (',' tfpdef ['=' test])* [',' '**' tfpdef] | '**' tfpdef]] | |
| | '*' [tfpdef] (',' tfpdef ['=' test])* [',' '**' tfpdef] | '**' tfpdef) | |
| -tfpdef: NAME [':' test] | |
| +tname: NAME [':' test] |