有關emacs - Linux
By Yuri
at 2009-12-03T23:57
at 2009-12-03T23:57
Table of Contents
※ 引述《kiani ()》之銘言:
: 我想請問在emacs下編寫c/c++程式
: 是否有像在visual studio下的提示功能
: 例如:
: 我只要打出 memcpy(
: 下面就會顯示出 memcpy的function prototype:
: void * memcpy ( void * destination, const void * source, size_t num );
: 然後我就可以知道 第幾個參數傳什麼東西
: 請問emacs是否有類似的功能??
: 感謝
: 推 superGA:yasnippet只有補字 沒有提示喔 12/03 19:22
emacs 是無敵的:P
我來說說作法,首先,請記得按照yasnippet網頁上說方法的安裝他
假如你一切都是依照預設方法安裝,
接下來請用emacs編輯
~/.emacs.d/elisp/snippets/text-mode/cc-mode/c-mode/memcpy
注意,上面紅色的是我放 snippet資料夾的地方
綠色的是以後要用此函式的 mode型式(範例為c-mode)
紫色的就是我要顯示function prototype 的函式名稱
裏面內容加上:
#contributor : coldnew <[email protected]>
#name : memcpy(void *destination, const void *source, size_t num);
# --
$>memcpy(${1:void *destination}, ${2:const void *source}, ${3:size_t num});
請在檔案內加入黃色的部份
如此依來,以後在c-mode裏面打上 memcpy後,按一下tab
就會出現以上的東西
範例簡單說明:
$> <--- 這個是自動縮排,縮排大小由該模式的設定所決定
${1:...} <--- 1 是第1的個、2是第二個,依此類推
第一個和第2個的差別是.....以後第一個輸入完蓋過後,按tab會跳到第二個
(實作時就知道了....我不太會解釋Orz...)
雖然無法弄到像原po所說的輸入完函式就會再底下顯示,但我覺得這個比較簡潔:P
--
: 我想請問在emacs下編寫c/c++程式
: 是否有像在visual studio下的提示功能
: 例如:
: 我只要打出 memcpy(
: 下面就會顯示出 memcpy的function prototype:
: void * memcpy ( void * destination, const void * source, size_t num );
: 然後我就可以知道 第幾個參數傳什麼東西
: 請問emacs是否有類似的功能??
: 感謝
: 推 superGA:yasnippet只有補字 沒有提示喔 12/03 19:22
emacs 是無敵的:P
我來說說作法,首先,請記得按照yasnippet網頁上說方法的安裝他
假如你一切都是依照預設方法安裝,
接下來請用emacs編輯
~/.emacs.d/elisp/snippets/text-mode/cc-mode/c-mode/memcpy
注意,上面紅色的是我放 snippet資料夾的地方
綠色的是以後要用此函式的 mode型式(範例為c-mode)
紫色的就是我要顯示function prototype 的函式名稱
裏面內容加上:
#contributor : coldnew <[email protected]>
#name : memcpy(void *destination, const void *source, size_t num);
# --
$>memcpy(${1:void *destination}, ${2:const void *source}, ${3:size_t num});
請在檔案內加入黃色的部份
如此依來,以後在c-mode裏面打上 memcpy後,按一下tab
就會出現以上的東西
範例簡單說明:
$> <--- 這個是自動縮排,縮排大小由該模式的設定所決定
${1:...} <--- 1 是第1的個、2是第二個,依此類推
第一個和第2個的差別是.....以後第一個輸入完蓋過後,按tab會跳到第二個
(實作時就知道了....我不太會解釋Orz...)
雖然無法弄到像原po所說的輸入完函式就會再底下顯示,但我覺得這個比較簡潔:P
--
Tags:
Linux
All Comments
By Selena
at 2009-12-06T06:42
at 2009-12-06T06:42
By Isla
at 2009-12-09T08:19
at 2009-12-09T08:19
By Kumar
at 2009-12-10T19:17
at 2009-12-10T19:17
By Jake
at 2009-12-13T12:48
at 2009-12-13T12:48
By Todd Johnson
at 2009-12-16T07:10
at 2009-12-16T07:10
By Aaliyah
at 2009-12-20T00:19
at 2009-12-20T00:19
By Ivy
at 2009-12-22T08:04
at 2009-12-22T08:04
By Ivy
at 2009-12-24T20:43
at 2009-12-24T20:43
By Dinah
at 2009-12-29T08:39
at 2009-12-29T08:39
By Barb Cronin
at 2010-01-01T12:46
at 2010-01-01T12:46
By Edwina
at 2010-01-06T01:41
at 2010-01-06T01:41
By Hamiltion
at 2010-01-08T08:57
at 2010-01-08T08:57
Related Posts
Asterisk 使用問題
By Una
at 2009-12-03T22:07
at 2009-12-03T22:07
CentOS與Fedora core
By Ophelia
at 2009-12-03T21:56
at 2009-12-03T21:56
要不要連署編輯器版?
By Rebecca
at 2009-12-03T21:28
at 2009-12-03T21:28
關於 Emacs 的 UTF-16 問題
By Lauren
at 2009-12-03T20:44
at 2009-12-03T20:44
有關emacs
By William
at 2009-12-03T16:13
at 2009-12-03T16:13