2015年5月12日星期二

Fatal error: Function name must be a string

1.  Open php.ini
2.  Find eaccelerator.enable = 1, change the value to 0
3.  Everything goes well

Tip: the module eAccelerator in Apache breaks PHP anonymous functions which causes the error.

折叠Visual Studio中的C++代码块

中文版:

[VS2013/2015]: 工具 -> 选项 -> 文本编辑器 -> C/C++ -> 查看 -> 大纲显示 -> 大纲语句块 = True

[VS2010/2012]: 工具 -> 选项 -> 文本编辑器 -> C/C++ -> 格式设置 -> 大纲显示 -> 大纲语句块 = True

[VS2008]: 工具 -> 选项 -> 文本编辑器 -> C/C++ -> 格式设置 -> 语句块的自动大纲显示 勾上即可

English:

[VS2013/2015]: Tools -> Options -> Text Editor -> C/C++ -> View -> Outline -> Outline Statement Blocks = True

[VS2010/2012]: Tools -> Options -> Text Editor -> C/C++ -> Formatting -> Outlining -> Outline Statement Blocks = True

[VS2008]: Tools -> Options -> Text Editor -> C/C++ -> Formatting -> Automatically outlining of statement blocks Set it checked.

2015年5月11日星期一

Visual Studio Code自定义配置

  • Theme

  1. Open the command pallet with Ctrl+Shift+P

  2. Type theme to shorten the list

  3. Select the theme you want and hit Enter

  • Settings

The menu under File, Preferences provides entries to configure user and workspace settings. You are provided with a list of default settings. Copy any setting that you want to change to the related settings file. Depending on your platform, this file is located here:
  1. Windows: %APPDATA%\Code\User\settings.json

  2. Mac: $HOME/Library/Application Support/User/settings.json

  3. Linux: $HOME/.config/Code/User/settings.json
Tip: Press Ctrl+Shift+O in the list of default settings to see an outline of all available settings.

  • Shortcuts

Key Command Commandid
Ctrl+X 剪切(未选中任何内容时剪切当前一行) editor.action.clipboardCutAction
Ctrl+C 复制(未选中任何内容是复制当前一行) editor.action.clipboardCopyAction
Shift+Delete 剪切行 editor.action.cutLines
Ctrl+Shift+K 删除行 editor.action.deleteLines
Ctrl+Enter 插入一行(当前行之下) editor.action.insertLineAfter
Ctrl+Shift+Enter 插入一行(当前行之上) editor.action.insertLineBefore
Alt+Down 挪到下一行 editor.action.moveLinesDownAction
Alt+Up 挪到上一行 editor.action.moveLinesUpAction
Shift+Alt+Down 复制到下一行 editor.action.copyLinesDownAction
Shift+Alt+Up 复制到上一行 editor.action.copyLinesUpAction
Ctrl+Shift+L 选中所有出现的当前关键字 editor.action.selectHighlights
Ctrl+F2 选中所有出现的当前关键词 editor.action.changeAll
Ctrl+Alt+Down 同时选中下一行 editor.action.insertCursorBelow
Ctrl+Alt+Up 同时选中上一行 editor.action.insertCursorAbove
Ctrl+Alt+] 跳至匹配的括号 editor.action.jumpToBracket
Ctrl+] 缩进 editor.action.indentLines
Ctrl+[ 缩出 editor.action.outdentLines
Home 跳至行首 cursorHome
End 跳至行尾 cursorEnd
Ctrl+End 跳至文件结尾 cursorBottom
Ctrl+Home 跳至文件起始 cursorTop
Ctrl+/ 行注释 editor.action.commentLine
Shift+Alt+A 块注释 editor.action.blockComment
Ctrl+F 查找 actions.find
Ctrl+H 替换 editor.action.startFindReplaceAction
F3 查找下一个 editor.action.nextMatchFindAction
Shift+F3 查找上一个 editor.action.previousMatchFindAction
Ctrl+M Tab键焦点切换开关 editor.action.toggleTabFocusMode


参考: https://code.visualstudio.com/docs/customization/keybindings

较新的博文 主页