£Ûת£Ý¹¹Ôì c++ IDE(linux)
±¾ÎÄת×Ô£ºhttp://www.cnblogs.com/blueoceanli/archive/2009/04/27/1444491.html
(ÐÞ¸Ä~/.vimrc,ûÓд´½¨Ö®)
set encoding=utf-8
syntax enable
syntax on
filetype on
set tabstop=4
set softtabstop=4
set shiftwidth=4
set cindent
set autoindent
filetype plugin indent on
1.Alternate (http://www.vim.org/scripts/script.php?script_id=31
)
ÔÚ¶ÔÓ¦µÄÍ·ÎļþºÍ´úÂëÎļþÖпìËÙµØÇл»
cp a.vim ~/.vim/plugin(ûÓдËĿ¼´´½¨Ö®)
2.ctags(×Ô´øµÄ¶¼ÓÐ)
×î·½±ãµÄ¹¦ÄÜÊǰѹâ±ê¶¨Î»ÔÚij¸ö±äÁ¿»òº¯Êý£¬°´ÏÂCtrl+]£¬ÕâÑùvim¾ÍÄÜÖ±½ÓÌøµ½Õâ¸ö±äÁ¿»òº¯Êý¶¨ÒåµÄÔ´ÎļþÖУ¬Ctrl+TÊÇCtrl+]µÄ·´²Ù×÷£¬¿ÉÒÔÍË»ØÔÀ´µÄµØ·½£¬ÎÒÃÇ¿ÉÒÔÁ¬Ðø°´N´ÎCtrl+]²éÕÒ±äÁ¿»òº¯Êý£¬È»ºóÔÙ°´N´ÎCtrl+T·µ»Ø¿ªÊ¼µÄµØ·½.
(ͳһʹÓÃ:ctags -R --c++-kinds=+p --fields=+iaS --extra=+q)
3.taglist (http://www.vim.org/scripts/script.php?script_id=273
)
ÓÃÓÚä¯ÀÀÎļþ£¬½á¹¹ÌåµÈ.
cd ~/.vim
unzip taglist.zip
4.OmniCppComplete (http://www.vim.org/scripts/script.php?script_id=1520
)
×Ô¶¯²¹È«.
cd ~/.vim
unzip OmniCppComplete_sample.zip
~/.vimrcÖÐÐèÓÐÈçÏÂÉèÖÃ
set nocp
filetype plugin on
set completeopt=menu
ÔËÐÐvim£¬²å¼þÒѾ×Ô¶¯¼ÓÔØ£¬ÐèÊÖ¶¯°Ñ²å¼þÎĵµ¼ÓÈëvim helpÖУº
:helptags ~/.vim/doc
´ò¿ªomnicppcomplete°ïÖúÈ·ÈÏ°²×°³É¹¦
:h omnicppcomplete
ÏÂÔØSTL (http://www.sgi.com/tech/stl/download.html
)µ½/tmpÖÐ
(Éú³ÉC++Í·Îļþtags,ÌرðʹÓà ctags -f ~/.vim/stltags -R --c++-kinds=+p --fields=+iaS --extra=+q --language-force=c++ /tmp/*
set tags+=~/.vim/stltags)
5.Supretab (http://www.vim.org/scripts/script.php?script_id=1643
)
°´ÏÂtab¼üÍê³Éinsert completion (:help ins-completion)£¬ÓëomnicppcompleteÅäºÏʹÓã¬Ð§¹û¸ü¼Ñ
cp supertab.vim ~/.vim/plugin
6.c.vim (http://www.vim.org/scripts/script.php?script_id=213
)
a. ÓÃÓÚÉú³É×¢ÊÍÎļþ
b. ÓÃÓÚÉú³Émainº¯Êý
c. ÓÃÓÚ×¢Êͺͽâ×¢ÊÍÓï¾ä£¬·½±ãµ÷ÊÔ
d. ÓÃÓÚ²åÈ뺯Êý£¬¸ñʽ»¯º¯Êý.
cd ~/.vim
unzip cvim.zip
7.code_complete.vim(http://www.vim.org/scripts/script.php?script_id=1764
).¹Ø×¢ snipMate && SnippetsEmu.
´úÂëƬ¶Ï£¬Ê¡Ê²»ÉÙ°¡.
cp code_complete.vim ~/.vim/plugin
(ͳһʹÓÃ:ctags -R --
Ïà¹ØÎĵµ£º
Ò»°ãrootÓû§²ÅÄÜÖ´ÐÐlsofÃüÁÆÕͨÓû§¿ÉÒÔ¿´¼û/usr/sbin/lsofÃüÁµ«ÊÇÆÕͨÓû§Ö´ÐлáÏÔʾ“permission denied”
ÎÒ×ܽáÒ»ÏÂlsofÖ¸ÁîµÄÓ÷¨£º
lsof abc.txt ÏÔʾ¿ªÆôÎļþabc.txtµÄ½ø³Ì
lsof -i :22 ÖªµÀ22¶Ë¿ÚÏÖÔÚÔËÐÐʲô³ÌÐò
lsof -c abc ÏÔʾabc½ø³ÌÏÖÔÚ´ò¿ªµÄÎļþ
lsof -g gid ÏÔʾ¹é ......
su -l ĬÈÏΪrootÓû§
Ò²¿Éд×÷ su root -l
»»×öÆäËû¼´ÎªÊ¹ÓÃÆäËûÓû§µÇ¼
´ÓrootÓû§Çл»µ½ÆäËûÓû§²»ÐèÒªÊäÈë¿ÚÁî
ÔÚÆäËûÕË»§¼äÇ뻶¼ÒªÊäÈë¿ÚÁî
ʹÓà sudo ¼ÓÉÏËùÒªÖ´ÐеÄÃüÁî¿ÉÒÔʹµÃÓû§µÄȨÏÞÁÙʱÇл»µ½³¬¼¶¹ÜÀíÔ±µÄ״̬Ï£¬¼´ÁÙʱÇл»ÁËÓû§¡£
Ò»°ãÐèÒªÊäÈë¿ÚÁʹÓúóÔÚÒ»¶Îʱ¼ä´ÁÄÚ²»ÐèÊäÈë¿ÚÁî¡£ ......
linux ÊØ»¤½ø³Ì
1.´´½¨×Ó½ø³Ì£¬¸¸½ø³ÌÍ˳ö
ÊØ»¤½ø³ÌÊÇÍÑÀëÖն˵ģ¬´ËʱµÄ×Ó½ø³ÌÓÉ1ºÅ½ø³ÌÁìÑø¡£
2.ÔÚ×Ó½ø³ÌÖд´½¨ÐµĻỰ
µ÷ÓÃsetsid£¨£©º¯Êý£¬×÷ÓÃÓÐÈý¸ö£¬Èýø³Ì°ÚÍÑԻỰµÄ¿ØÖÆ£»Èýø³Ì°ÚÍÑÔ½ø³Ì×éµÄ¿ØÖÆ£»
Èýø³Ì°ÚÍÑÔ¿ØÖÆÖն˵ĿØÖÆ
ÕâÀïÐèÒª½éÉܽø³Ì×éºÍ»á»°×éµÄ¸ÅÄî
½ø³Ì×飺ÊÇÒ»¸ö»ò¶à¸ö½ø³ÌµÄ¼¯ºÏ£¬Óɽ ......
Ê×ÏȽéÉÜÒ»¸öÃû´Ê“¿ØÖÆ̨£¨console£©”£¬Ëü¾ÍÊÇÎÒÃÇͨ³£¼ûµ½µÄʹÓÃ×Ö·û²Ù×÷½çÃæµÄÈË»ú½Ó¿Ú£¬ÀýÈçdos¡£ÎÒÃÇ˵¿ØÖÆ̨ÃüÁ¾ÍÊÇָͨ¹ý×Ö·û½çÃæÊäÈëµÄ¿ÉÒÔ²Ù×÷ϵͳµÄÃüÁÀýÈçdosÃüÁî¾ÍÊÇ¿ØÖÆ̨ÃüÁî¡£ÎÒÃÇÏÖÔÚÒªÁ˽âµÄÊÇ»ùÓÚLinux²Ù×÷ϵͳµÄ»ù±¾¿ØÖÆ̨ÃüÁî¡£ÓÐÒ»µãÒ»¶¨Òª×¢Ò⣬ºÍdosÃüÁͬµÄÊÇ£¬LinuxµÄÃü ......
Ä¿Ç°£¬Linux×÷ΪǶÈëʽϵͳµÄÖ÷Á¦¾ü£¬¹ã·ºÓ¦ÓÃÓÚÏû·ÑÀàµç×Ó¡¢¹¤Òµ¿ØÖÆ¡¢¾ü¹¤µç×Ó¡¢µçÐÅ/ÍøÂç/ͨѶ¡¢º½¿Õº½Ìì¡¢Æû³µµç×Ó¡¢Ò½ÁÆÉ豸¡¢ÒÇÆ÷ÒDZíµÈÏà¹ØÐÐÒµ¡£Ëæ×ÅǶÈëʽÐÐÒµµÄѸÃÍ·¢Õ¹£¬Ç¶ÈëʽLinuxƾ½èÆäϵͳ·¢Õ¹µÄ³ÉÊì¶È¡¢Êг¡Ó¦Óõĸ߷ݶîÒ²Êܵ½¸ü¶à¹¤³ÌʦÅóÓѵÄÇàíù£¬Ô½À´Ô½¶àµÄÆóÒµºÍÑз¢»ú¹¹¶¼×ªÏòǶÈëʽLinuxµÄ¿ ......