- tsukkee
As you know, the world most powerful editor!!
But, note that, to use vim efficiently:
| let g:vim_lsp_settings_volar_options = #{ | |
| \ typescript: #{ | |
| \ serverPath: "/path/to/node_modules/typescript/lib/tsserverlibrary.js", | |
| \ }, | |
| \ languageFeatures: #{ | |
| \ references: #{ enabledInTsScript: v:true }, | |
| \ definition: v:true, | |
| \ typeDefinition: v:true, | |
| \ callHierarchy: v:true, | |
| \ hover: v:true, |
| require 'vcard' | |
| require 'nkf' | |
| file = open(ARGV[0], 'r') | |
| vcard = Vcard::Vcard.decode(file) | |
| def to_hiragane(katakana) | |
| NKF.nkf('-w --hiragana', katakana) | |
| end |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <curses.h> | |
| int main() { | |
| WINDOW* mainwin; | |
| if ((mainwin = initscr()) == NULL) { | |
| fprintf(stderr, "Error initialsing ncurses.\n"); | |
| exit(EXIT_FAILURE); |
| function! Generator() | |
| function! Inner1(value) closure | |
| let i = a:value | |
| function! Inner2(value) closure | |
| let i += a:value | |
| function! Inner3(value) closure | |
| let i += a:value | |
| function! Inner4(value) closure | |
| let i += a:value | |
| return {'value': i, 'done': v:true} |
| echomsg 'begin' | |
| python <<EOF | |
| # coding: utf-8 | |
| import thread | |
| import time | |
| def func(): | |
| for i in range(0, 10): | |
| print i |
| python <<EOM | |
| # coding=utf-8 | |
| import vim | |
| import re | |
| # decorator for defining Vim script function | |
| _functions_for_vim = {} | |
| def vimfunc(name, *args): | |
| def _(func): | |
| _functions_for_vim[name] = func |
| #include <windows.h> | |
| #include <tchar.h> | |
| #include <sstream> | |
| typedef std::basic_stringstream<TCHAR> tstringstream; | |
| template<typename T> tstringstream& operator,(tstringstream& tss, T t) { tss << _T(" ") << t; return tss; } | |
| #define OUTPUT_DEBUG_STRING(...) ::OutputDebugString((tstringstream(), _T("***"), __VA_ARGS__, _T("\n")).str().c_str()); | |
| int main(int argc, char *argv[]) { | |
| OUTPUT_DEBUG_STRING(_T("abc"), 1, 2.3, true); // -> " *** abc 1 2.3 1" |
| -- | |
| Yokohama.vim #2 | |
| キーマッピングを考える | |
| tsukkee | |
| function! s:read_line() dict | |
| let l:output = self.buffer | |
| let l:res = l:output | |
| while l:res !~ '\r\?\n' && !self.__eof | |
| let l:res = self.read(256) | |
| let l:output .= l:res | |
| endwhile | |
| let l:pos = match(l:output, '\v%(\r?\n|$)\zs') | |
| let l:line = matchstr(l:output[: l:pos - 1], '.\{-}\ze\r\?\n$') |