VSCode ã® Emacs keymaps æ¡å¼µã«ã¤ãã¦ã®ã¡ã¢
æ¦è¦
Visual Studio Code 㧠Emacs 風ã®æä½ãæä¾ããæ¡å¼µãããã¤ã試ãããç´°ããã¨ããã§éåæããã£ãã®ã§ããã®è¦ãæ¸ããã¡ã¢ãã¦ããã
èªåãæ¬å½ã«æã Emacs 風ã®æä½ãå®ç¾ããããã«ã¯ããã¯ãèªåã§æ¡å¼µãä½æããªããã°ãªããªãããã ãNotKyon ããã® Emacs Friendly Keybindings - Visual Studio Marketplace ãã fork ããããPull Request ãæããã®ãä¸çªç®çã«è¿ãããã«æãããã
tuttieee ããããããªãçæ³ã«è¿ã Awesome Emacs Keymap - Visual Studio Marketplace ãä½æãã¦ãã ãã£ãã®ã§ãããã使ã£ã¦ãããã¨æãã¾ãï¼ï¼ï¼ (2019/1/11追è¨)
Keymap 調æ»
Emacs 風ã«ããæ¡å¼µã¯ã±ã£ã¨æ¤ç´¢ããã ãã§11åãè¦ã¤ãããã¯ããã¦ã©ããè¯ãã®ã ããã?
- ãªããç¾å¨ä½¿ç¨ãã¦ãã Emacs Friendly Keymap 以å¤ã¯çæéãã使ç¨ãã¦ããªã
- æçµæ´æ°æ¥ã2017年以åã®ãã®ã¯ãéçºåæ¢ã¨ãããã¨ã«ãã¦ãã
hiro-sun ç³»
Emacs 風æ¡å¼µã®ãã¡ãæãå¤ãã¨æããããã®ã hiro-sun ã®ãã®ã§ããããã®æ´¾çç©ãå¤ãåå¨ãããæ´¾çç©ã¯ã ãããå ±éã®æ¬ ç¹ãæã¡ãèªåã®ãã¼ãºã«åã£ã¦ããªãé¨åãããä¼¼ã¦ããã
- å
¨ä½çãªç¹å¾´
- pros:
- èªåãæ³å®ãã¦ãã Emacs çãªæä½ãã»ã¼ç¶²ç¾ ãã¦ãã
- cons:
- ãã使ã C-x 2 (split-window-below) ãåå¨ããªãããEmacs ã¨åå²æ¹åãç°ãªã
- ãã¾ã«ä½¿ã C-o (open-line) ãæªå®è£
- ãã¾ã«ä½¿ã C-x C-c (save-buffers-kill-terminal) ãæªå®è£
- Multi Cursor æ©è½ã¨ç¸æ§ãæªã
- pros:
- Emacs Keymap - Visual Studio Marketplace (2016/2/16 ~ 11/10) éçºåæ¢
- hiro-sun
- Emacs Keymap Improved - Visual Studio Marketplace (2017/7/23 ~ 8/25) éçºåæ¢
- rkwan94, Robert Kwan (forked from hiro-sun)
- cons:
- ãã¦ã¹ã§ç¯å²é¸æå¾ã« M-w ãã¦ããç¯å²é¸æç¶æ ãç¶ç¶ãã¦ãã¾ã
- Emacs HJKL - Visual Studio Marketplace (2017/6/7 ~ 22) éçºåæ¢
- dotWaldemr, Waldemar D. (forked from hiro-sun)
- cons:
- 移åã HJKL
- æ示çã« fork ãã¦ããªãããå®éã«ã¯ hiro-sun ã®ãã®ããã® fork ã ã¨æããã
- Emacs Mininum Keymap - Visual Studio Marketplace (2018/6/19)
- jamesyang999, futurist (forked from hiro-sun)
- cons:
- 移åç³»ã®ã³ãã³ãã®ã¿ãå®è£
- Emacs Keybindings with S-exp - Visual Studio Marketplace (2018/8/22 ~ 23)
- haruhi-s (forked from hiro-sun)
SebastianZaha ç³» (forked from hiro-sun)
- Emacs Friendly Keymap - Visual Studio Marketplace (2017/3/9 ~ 10/10) éçºåæ¢
- SebastianZaha, Leaping Frog Studios (forked from hiro-sun)
- ç¾å¨ä½¿ç¨ä¸
- Emacs - Visual Studio Marketplace (2018/4/8)
- VSCodeEmacs (forked from SebastianZaha (forked from hiro-sun))
- cons:
- ããã¥ã¡ã³ããåå¨ããªã
- æ示çã« fork ãã¦ããªãããå®éã«ã¯ SebastianZaha ã®ãã®ããã® fork ã ã¨æããã
- Emacs Friendly Keybindings - Visual Studio Marketplace (2018/12/2)
- NotKyon (forked from SebastianZaha (forked from hiro-sun))
- pros:
- C-x 2 (split-window-below), C-x 3 (split-window-right) ã®ç»é¢åå²ã Emacs ã¨ã»ã¼åã
ä»ã®æ¡å¼µã¨åæã«ä½¿ç¨ãããã® (2019/1/4追è¨)
- Emacs Candies - Visual Studio Marketplace (2017/7/31) éçºåæ¢
- Giyya Pan
- Emacs Keymap (hiro-sun) ã¨åæã«ä½¿ç¨ãã
- cons:
- cursorHome, killToEndOfLine ãä»ãå ãã¦ããã®ã¿
- EmacsPigmee - Visual Studio Marketplace (2018/3/5 ~ 6)
- naturallucky
- Emacs Friendly Keymap (SebastianZaha) ã¨åæã«ä½¿ç¨ãã
ãã®ã»ã
- emacs-region - Visual Studio Marketplace (2016/4/2 ~ 2017/7/17) éçºåæ¢ (2019/1/4追è¨)
- t-yng
- cons:
- M- ç³»ã®ãã¼ãã¤ã³ãã£ã³ã°ãã»ã¨ãã©å®ç¾©ããã¦ããªã
- emacs-functions - Visual Studio Marketplace (2016/11/4 ~ 2017/2/18) éçºåæ¢
- shirou, WAKAYAMA Shirou
- cons:
M- ç³»ã®ãã¼ãã¤ã³ãã£ã³ã°ããã¨ãã¨ãåä½ããªã (bug?)- M- ç³»ã®ãã¼ãã¤ã³ãã£ã³ã°ãå®ç¾©ããã¦ããªã (2019/1/4追è¨)
- VSmacs - Visual Studio Marketplace (2017/2/26 ~ 11/25) éçºåæ¢
- kpping, Krittanan Pingclasai
- cons:
- M- ç³»ã®ãã¼ãã¤ã³ãã£ã³ã°ãå®ç¾©ããã¦ããªã
- VSCode Emacs Flavor - Visual Studio Marketplace (2018/5/25 ~ 6/2)
- tommas1988, Tommas Yuan
- cons:
- M-f, M-b ãåä½ããªã (ã¨ã©ã¼ã¡ãã»ã¼ã¸ã表示ããããbug?)
- emacs-region - Visual Studio Marketplace (2018/6/10) (2019/1/4追è¨)
- ayrtonmassey, Ayrton Massey (forked from t-yng)
- cons:
- M- ç³»ã®ãã¼ãã¤ã³ãã£ã³ã°ãã»ã¨ãã©å®ç¾©ããã¦ããªã
- Emacs Extras - Visual Studio Marketplace (2018/10/5 ~ 12/7) (2019/1/4追è¨)
- youngderekm, Derek Young
- cons:
- ããä¸é¨ã®æ©è½ããå®è£ ããã¦ããªã
- Awesome Emacs Keymap - Visual Studio Marketplace (2019/1/6 ~ 11) (2019/1/11追è¨)
- tuttieee, Yuichiro Tsuchiya
- pros
- Multi Cursor æ©è½ã¨ç¸æ§ãè¯ãããã«ä½ããã¦ãã
- C-x 2 (split-window-below), C-x 3 (split-window-right) ã®ç»é¢åå²ã Emacs ã¨ã»ã¼åã
- ãã®æ¡å¼µåä½ã§åä½ãã (aki77ã¯åä½ã§ã¯å®ç¾©ããã¦ããªãæ©è½ãå¤ã)
- cons
- ããã¤ãã®ãã° or æªå®è£ (issue ãæãã)
macOS å°ç¨ (2019/1/12追è¨)
- vscode-emacs-ergomac - Visual Studio Marketplace (2018/3/15) (2019/1/4追è¨)
- RumataEstor, Dmitry Belyaev (forked from SebastianZaha (forked from hiro-sun))
- SebastianZaha ã®ãã®ãã C- ã â- ã«ç½®ãæãããã®ã
- nemacs - Visual Studio Marketplace (2016/7/1 ~ 15) éçºåæ¢ (2019/1/4追è¨)
- naturalethic
- cons:
- Mac ç¨ãªã®ã§ãM- ç³»ã®ãã¼ãã¤ã³ãã Windows ãã¼ã使ç¨ãã¦å®è£ ããã¦ãã
- Tiny Emacs - Visual Studio Marketplace (2018/7/8 ~ 24)
- aki77
Emacs Keymap (hiro-sun) ã¨åæã«ä½¿ç¨ãã (ããã¥ã¡ã³ãã«æ¸ããã¦ããªãã®ã§æ¨æ¸¬)- ãã¾ã¾ã§èª¤è§£ãã¦ããã®ã ãããã®æ¡å¼µã¯ãããã macOS å°ç¨ãVSCode ã macOS ã§ä½¿ç¨ããå ´åã¯ãããã©ã«ãã®ã«ã¼ã½ã«ç§»åãã¼ã Emacs ã£ã½ããã¤ã³ãã£ã³ã°ã«ãªã£ã¦ãããããã®ã§ãã®ãããã¯ããããå®ç¾©ãã¦ããªãã¨æããã (2019/1/12追è¨)
- pros:
- Multi Cursor æ©è½ã¨ç¸æ§ãè¯ãããã«ä½ããã¦ãã
- Multi Cursor ã§è¤æ°ã®é¸æç¯å²ãæãã¦ããéã«ãC-f ã§é¸æç¯å²ãæ¡å¤§ããã C-b ã§é¸æç¯å²ã縮å°ãããã§ãã
- C-x 2 (split-window-below), C-x 3 (split-window-right) ã®ç»é¢åå²ã Emacs ã¨ã»ã¼åã
- Multi Cursor æ©è½ã¨ç¸æ§ãè¯ãããã«ä½ããã¦ãã
- cons:
- ããã©ã«ãæ©è½ã¨è¢«ããã¼ã¯å®ç¾©ããã¦ããªã (C-f ãªã©)
Keymap ã§ã¯ãªããã®ã®èª¿æ» (2019/1/4追è¨)
以ä¸ã®ãã®ã¯ãKeymap ãæ§æãããã³ãã³ãã ãã追å ããããã®ãããèªå㧠Keyboard Shortcuts (keybindings.json) ãè¨å®ããªããã°ãªããªãã (試ç¨ãã¦ããªãã®ã§ãå®éã«æå¾ éãã®åä½ãããã®ãã©ããä¸æ)
- VS Code Mark/Point - Visual Studio Marketplace (2016/1/5) éçºåæ¢
- set-mark-command
- multi-cursor-emacs-mark - Visual Studio Marketplace (2017/8/23 ~ 9/2) éçºåæ¢
- set-mark-command é¢é£ã®ã³ãã³ããMulti Cursor ããµãã¼ããã¦ããã
- vscode-emacs-tab - Visual Studio Marketplace (2017/11/15 ~ 12/2) éçºåæ¢
- TAB ãå ¥åããã¨ãã®æåã Emacs ã£ã½ã (indent-for-tab-command) ããã³ãã³ã
C# ã® double ã® %
C# 5.0 ã® double ã® % ããªããä»æ§ã¨ã¯ç°ãªãå¤ãè¿ãæ°ãããã¨ãã話ã
Download C# Language Specification 5.0 from Official Microsoft Download Center C# 5.0 ã®è¨èªä»æ§ã«ããã°ã
7.8.3 Remainder operator
- Floating-point remainder:
double operator %(double x, double y);z is the result of x % y and is computed as x - n * y,
where n is the largest possible integer that is less than or equal to x / y.
ã¨ã®ãã¨ãªã®ã§ãn = Floor(x / y) ã®ããº...ãã§ãå®é㯠Truncate ã£ã½ãåä½ãããã
static void ReminderOperatorDoubleFloor() { var x = -5.2; var y = 2.0; var n = System.Math.Floor(x / y); var z = x - n * y; Console.Out.WriteLine("FLOOR: x = {0}, y = {1}, n = {2}, z = {3}, x % y = {4}", x, y, n, z, x % y); // => FLOOR: x = -5.2, y = 2, n = -3, z = 0.8, x % y = -1.2 } static void ReminderOperatorDoubleTruncate() { var x = -5.2; var y = 2.0; var n = System.Math.Truncate(x / y); var z = x - n * y; Console.Out.WriteLine("TRUNCATE: x = {0}, y = {1}, n = {2}, z = {3}, x % y = {4}", x, y, n, z, x % y); // => TRUNCATE: x = -5.2, y = 2, n = -2, z = -1.2, x % y = -1.2 } static void ReminderOperatorInt() { var x = -52; var y = 20; var n = x / y; var z = x - (x / y) * y; Console.Out.WriteLine("INT: x = {0}, y = {1}, n = {2}, z = {3}, x % y = {4}", x, y, n, z, x % y); // => INT: x = -52, y = 20, n = -2, z = -12, x % y = -12 }
ã§ãå®éã©ããªå¼ã使ããã¦ãã®ãã¨ãã㨠Math.IEEERemainder(Double, Double) Method (System) | Microsoft Docs ã® Remarks ã«æ¸ããã¦ããããAbs ã使ã£ãä¸ã§ Floor ãã¦ç¬¦å·ã¯å¾ãã追å ãã¦ãããã§ãä»æ§ã«ã¯ Abs 使ããªãã¦æ¸ãã¦ãªãããã!*1
# è足ã§ãã C++03 ã§ã¯ double ã® % æ¼ç®ã¯å®ç¾©ããã¦ãããã³ã³ãã¤ã«ã§ããªãã
C++11 ã®æ£è¦è¡¨ç¾ã©ã¤ãã©ãªã®ææ§ã
libstdc++ ã® regex ãå®è£ ãããããã§ãã
- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631#c17
- http://ww.reddit.com/r/cpp/comments/1nqxg5/regular_expression_support_c11_regex_in_libstdcv3/
- http://gcc.gnu.org/?20131008212833
ããã§ãä»æ§ã®ææ§ãªç¹(2ç¹)ã調æ»ãã¦çºãã¾ããã
GitHub Pages æ©è½ã使ã£ããã¨ãç¡ãã£ãã®ã§ã試ãã«ä½¿ã£ã¦ã¿ããã¨ãããã¨ã§ä¸è¨ã®ã¨ããã§å ¬éãã¦ããã¾ãã
gh-pages ãã©ã³ãã®ä¸ã§ symlink ãä½ã£ã¦ããGitHub Pages ã§å ¬éããããã¼ã¸ã§ã¯ symlink ã¯è¾¿ã£ã¦ãããªãããã§ããããã®ãããã¡ãã£ã¨ã ãä¿®æ£ãå¿ è¦ã§ããã
æ£è¦è¡¨ç¾ã§ [a-[:alpha:]ï¼½ ã®æå³ã£ã¦?
C++11 ã®ä»æ§ã«å¯¾ããçå
C++11 ã®æ£è¦è¡¨ç¾ (std::regex_constants::ECMAScript æ) ã®ä»æ§ã¯ ECMA-262 ã®ææ³ã次ã®ããã«å¾®å¦ã«å¤æ´ãããã®ã¨ãªã£ã¦ãã¾ãã
ClassAtom ::
-
ClassAtomNoDash
ClassAtomExClass
ClassAtomCollatingElement
ClassAtomEquivalence
ClassAtomExClass ::
[: ClassName :]
ClassAtomCollatingElement ::
[. ClassName .]
ClassAtomEquivalence ::
[= ClassName =]
ClassName ::
ClassNameCharacter
ClassNameCharacter ClassName
ClassNameCharacter ::
SourceCharacter but not one of "." "=" ":"
(ãã©ãã n3337.pdf ãã)
ãã㦠ECMA-262 ã®æ£è¦è¡¨ç¾ã®æåã¯ã©ã¹å¨ãã®ææ³ã¯ã ããã以ä¸ã®ãããªæãã«ãªã£ã¦ãã¾ãã
CharacterClass ::
[ [lookahead ∉ {^}] ClassRanges ]
[ ^ ClassRanges ]
ClassRanges ::
[empty]
NonemptyClassRanges
NonemptyClassRanges ::
ClassAtom
ClassAtom NonemptyClassRangesNoDash
ClassAtom - ClassAtom ClassRanges
NonemptyClassRangesNoDash ::
ClassAtom
ClassAtomNoDash NonemptyClassRangesNoDash
ClassAtomNoDash - ClassAtom ClassRanges
ClassAtom :: (ãã㯠C++11 ã®ä»æ§ã§å¤æ´ããã)
-
ClassAtomNoDash
ClassAtomNoDash ::
SourceCharacter but not one of \ or ] or -
\ ClassEscape
ClassEscape ::
DecimalEscape
b
CharacterEscape
CharacterClassEscape
(Standard ECMA-262 ãã)
ããã§ã強調ããé¨åãã¤ã¾ã以ä¸ã®é¨å
ClassAtom ::
ClassAtomExClass
NonemptyClassRanges ::
ClassAtom - ClassAtom ClassRanges
NonemptyClassRangesNoDash ::
ClassAtomNoDash - ClassAtom ClassRanges
ãç´ ç´ã«è§£éããã¨ãä¾ãã°æ¬¡ã®ãããªæ£è¦è¡¨ç¾ã¯ææ³ä¸æ£ããã¨ãããã¨ã«ãªãã¾ãã
[a-[:alpha:]] [[:alpha:]-a] [[:alpha:]-[:alpha:]]
ææ³ä¸ã¯æ£ããã¨ãã£ã¦ããä½ã表ç¾ãã¦ããã®ãæå³ããããããã¾ããã
ç¾å®ã®å®è£ ã§ã¯?
ä¾ãã°ãBoost C++ Libraries ã§ã¯ãã¹ãã±ã¼ã¹ (test_sets.cpp) å ã§ã以ä¸ã®ãããªãã¹ãããã¦ããã
TEST_INVALID_REGEX("[a-[:alpha:]]", boost::regex::extended);
åé¡ã¨ãªãæ£è¦è¡¨ç¾ãè¨è¿°ã§ããªããã¨ã確ããã¦ãã¾ãã
ã¾ããOS X Mountain Lion ã® clang-425.0.28 ã§ã¯ã
#include <regex> #include <iostream> int main() { std::locale::global(std::locale("C")); std::regex re("[a-[:alpha:]]"); std::cout << std::boolalpha << regex_match("a", re) << std::endl; std::cout << std::boolalpha << regex_match("b", re) << std::endl; return 0; }
ä¸è¨ã®ã½ã¼ã¹ã -std=c++11 -stdlib=libc++ ã§ã³ã³ãã¤ã«ãã¦å®è¡ããã¨
ãåºåããã¾ãããªã«ãèµ·ãã£ãã®ããããããã¾ããã
true
false
ã¾ããVisual Studio 2012 Express ã§ã¯ä¸è¨ã®ã½ã¼ã¹ãå®è¡ãã㨠std::regex ã®ã³ã³ã¹ãã©ã¯ã¿å 㧠std::regex_error ä¾å¤ã .code() == std::regex_constants::error_range 㧠throw ããã¾ãã
ã¾ã¨ã
ã¨ããããã§ããã®åé¡ã¯ C++11 ã®ä»æ§ã®ééãã¨ãã¦è§£éããã®ãè¯ãã¨æãã¾ãã
zshã®ããã©ã«ãã®è£å®ã®å®ç¾©ã使ããªããã¨ã«ãã
zshã§ä»¥ä¸ã®ããã«è¨å®ãã¦ããã¨
autoload -Uz compinit
compinit
æ§ã ãªè£å®ãããã©ã«ãã§å®ç¾©ããã¾ãããã»ã¨ãã©ã®å®ç¾©ã¯èªåã«ã¯ä¸è¦ã§ãããã¨ãæè¿åãã£ã¦ãã¾ããã
ããã
make ãã¡ã¤ã«å
ã¨å®è¡ãããã®ã«ãã¡ã¤ã«åãè£å®ã§ããªããªã©ãä¸ä¾¿ãªç¹ã®ã»ããç®ç«ã¡ã¾ãã
compinit ãè¡ããªããã°ããã©ã«ãã®è£å®ãå®ç¾©ãããªãã®ã§ä¸è¨ã®ãããªä¸ä¾¿ã¯ãªãã®ã§ããããã®ä»£ããè£å®åè£ã«è²ãä»ããªããªã£ã¦ãã¾ãã®ã§ããã¯ããã§ä¸ä¾¿ã§ãã
ããã§ãcompinit ãå®è¡ããä¸ã§ä¸è¦ãªå®ç¾©ãã°ã£ããåé¤ãããã¨ã«ãã¾ããã
autoload -Uz compinit compinit # ã»ã¨ãã©ã®è£å®ã®å®ç¾©ãåé¤ããã # special contexts ã®å®ç¾©ã®ã¿æ®ã (see: man zshcompsys) fix_comp_assoc() { local var=$1 shift for key in "$argv[@]"; do case $key in -redirect-,\<,*) unset "${var}[$key]";; -redirect-,\>,*) unset "${var}[$key]";; -value-,-*) ;; -value-,*) unset "${var}[$key]";; -*) ;; *) unset "${var}[$key]";; esac done } fix_comp_assoc _comps "${(k)_comps[@]}" fix_comp_assoc _services "${(k)_services[@]}" fix_comp_assoc _patcomps "${(k)_patcomps[@]}" fix_comp_assoc _postpatcomps "${(k)_postpatcomps[@]}"
compinit ã§ã¯ãè£å®ããæã«ã©ã®ãããªã³ã³ããã¹ãã§ã©ã®ã³ãã³ããå©ç¨ããã¨ããä¸è¦§ã¯ _comps, _services, _patcomps, _postpatcomps ã¨ããé£æ³é åã«æ ¼ç´ãããããã§ã*1ãããã§ããããã®å®ç¾©ã®ä¸ãã special contexts ã®å®ç¾©ä»¥å¤ãã°ã£ããåãããã«ãã¾ããã
ããã§
make ãã¡ã¤ã«å
ãå®è¡å¯è½ã«ãªããå¿«é©zshã©ã¤ããéããã¨ãã§ãããã§ãã
# ãããããã£ã¨è¯ãããããããããããªãã®ã§ããâ¦
*1:ãããã®å¤æ°ã®ããã©ã«ãã®å 容㯠~/.zcompdump ã¸ãã³ãããã¦ããã®ã§ããã§ç¢ºèªããã®ã楽ã§ã
Storyboardsã使ã£ã¦ããæã®UITableViewã®dequeueReusableCellWithIdentifier:ã®æå
UITableViewã®dequeueReusableCellWithIdentifier:ãnibããCellãèªåçã«ä½æãã¦ãããããã«è¦ããæåã¯ã©ãã§èª¬æããã¦ãããã ?
2012-02-28 19:12:22 via web
@ganaware çºè¦ãStoryboardsã使ã£ã¦ããã¨ãéå®ã®æ©è½ãªã®ãã URL
2012-02-28 19:39:16 via web to @ganaware
ãã®æ å ±ã«è¡ãå½ããã®ã«è¦å´ããã®ã§ã¡ã¢
ã¯ã¦ãªããã¯ãã¼ã¯/COOKPADç»å表示(Chromeæ¡å¼µ)
はてなブックマーク/COOKPAD画像表示 - Chrome Web Store
ã¯ã¦ãªããã¯ãã¼ã¯ã§COOKPADã®ã¬ã·ããããã¯ãã¼ã¯ãã¦ããå ´åã«ãã¬ã·ãã®åçãä¸ç·ã«è¡¨ç¤ºãã¦ãããæ¡å¼µã§ããå æ¥ãµã¨æãç«ã£ã¦ä½ã£ã¦ã¿ã¾ããã
Greasemonkeyã§ãæ¸ããå 容ã®æ¡å¼µã§ãããChromeæ¡å¼µã¨ãã¦ä½ãã¾ããããªãã¨ãªãã