hello world
12 七 2010 29 Comments
in C, Linux Tags: GTK+, ubuntu, vim
用GTK+写出的第一个“hello world”,纪念下
居然区别大小写……哎,很不方便,因为要切换大小写。
梦中我微笑着 梦着我的记忆
12 七 2010 29 Comments
in C, Linux Tags: GTK+, ubuntu, vim
用GTK+写出的第一个“hello world”,纪念下
居然区别大小写……哎,很不方便,因为要切换大小写。
14 六 2010 31 Comments
in C, Linux Tags: C, ubuntu, vim
为了C语言而设置,我的.vimrc文件内容(vim版本7.2.330,在ubuntu10.04下安装的)
我也是个初学者,不想照搬网络上已有的配置文件,因此先从最简单的开始吧,离好用还有很大差距。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | "显示行号 set nu " C的编译和运行,按F5 map <f5> :call CompileRunGcc() func! CompileRunGcc() exec "w" exec "!gcc -Wall -g % -o %<" exec "! ./%<" endfunc " C++的编译和运行,按F6 map <f6> :call CompileRunGpp() func! CompileRunGpp() exec "w" exec "!g++ -Wall -g % -o %<" exec "! ./%<" endfunc "自动缩进相关 set autoindent set cindent "配色 colorscheme desert "自动括号补全不一定特别方便,但至少不会把括号忘记了 :inoremap ( ()i :inoremap ) =ClosePair(')') :inoremap { {}i :inoremap } =ClosePair('}') :inoremap [ []i :inoremap ] =ClosePair(']') :inoremap < <>i :inoremap > =ClosePair('>') function ClosePair(char) if getline('.')[col('.') - 1] == a:char return "\" else return a:char endif endf "Taglist插件和winmanager的设置(需要下载安装这两个插件),按F4显示winmanager "据说Taglist需要安装ctags(总之我装了,没验证过),在ubuntu10.04中为exuberant-ctags软件包 let g:Tlist_Use_Left_Window=1 let g:Tlist_Show_One_File=1 let g:Tlist_Compact_Format=1 let Tlist_Exit_OnlyWindow=1 let g:winManagerWindowLayout='FileExplorer|TagList' nmap <f4> :WMToggle </f4></f6></f5> |
++++++++++++++++++++++++++++++++++++++++++++++++++++
插件
++++++++++++++++++++++++++++++++++++++++++++++++++++
TabBar 打开多个文档时可以像UE一样有标签的效果..通过alt+1,2,3切换,见效果图3
WinManager 文件管理和窗口管理器,见效果图3
TagList 显示代码中的函数、类、变量等等,见效果图3
近期评论