[问题]linux下类似于VC++的软件是什么?
发表于 : 2008-07-19 23:23
rt
菜鸟,刚学,问菜问题……
菜鸟,刚学,问菜问题……
bones7456 写了:vim + gcc
代码: 全选
\p< #include <> (n,i)
\p" #include "" (n,i)
\pd #define (n,i)
\pu #undef (n,i)
\pie #if #else #endif (n,v,i)
\pid #ifdef #else #endif (n,v,i)
\pin #ifndef #else #endif (n,v,i)
\pind #ifndef #def #endif (n,v,i)
\pi0 #if 0 #endif (n,v,i)
\pr0 remove #if 0 #endif (n)
-- Idioms
-------------------------------------------------------------
\if function (n,v,i)
\isf static function (n,v,i)
\im main() (n,v,i)
\i0 for( x=0; x<n; x+=1 ) (n,v,i)
\in for( x=n-1; x>=0; x-=1 ) (n,v,i)
\ie enum + typedef (n,i)
\is struct + typedef (n,i)
\iu union + typedef (n,i)
\ip printf() (n,i)
\isc scanf() (n,i)
\ica p=calloc() (n,i)
\ima p=malloc() (n,i)
\isi sizeof() (n,v,i)
\ias assert() (n,v)
\ii open input file (n,i)
\io open output file (n,i)
-- Snippets
-----------------------------------------------------------
\nr read code snippet (n)
\nw write code snippet (n,v)
\ne edit code snippet (n)
\np pick up prototype (n,v)
\ni insert prototype(s) (n)
\nc clear prototype(s) (n)
\ns show prototype(s) (n)
-- C++
----------------------------------------------------------------
\+c class (n,i)
\+cn class (using new) (n,i)
\+ci class implementation (n,i)
\+cni class (using new) implementation (n,i)
\+mi method implementation (n,i)
\+ai accessor implementation (n,i)
\+tc template class (n,i)
\+tcn template class (using new) (n,i)
\+tci template class implementation (n,i)
\+tcni template class (using new) impl. (n,i)
\+tmi template method implementation (n,i)
\+tai template accessor implementation (n,i)
\+tf template function (n,i)
\+ec error class (n,i)
\+tr try ... catch (n,v,i)
\+ca catch (n,v,i)
\+c. catch(...) (n,v,i)
-- Run
----------------------------------------------------------------
\rc save and compile (n)
\rl link (n)
\rr run (n)
\ra set comand line arguments (n)
\rm run make (n)
\rg cmd. line arg. for make (n)
\rp run splint (n)
\ri cmd. line arg. for splint (n)
\rk run CodeCheck (TM) (n)
\re cmd. line arg. for CodeCheck (TM) (n)
\rd run indent (n,v)
\rh hardcopy buffer (n,v)
\rs show plugin settings (n)
\rx set xterm size (n, only Linux/UNIX & GUI)
\ro change output destination (n)
\rt rebuild templates (n)
下面是自动触发的
do
readfile
beginend
once
class
This
printf
vector
struct
template
this
namespace
namespace
map
mark
if
main
Inc
inc
for
textmate 模板:ruben 写了:kofshower
请问你的个gvim是怎么配置的?
代码: 全选
"Tlist 和 wm的设置
"命令模式输入wm打开Tlist和WM
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
let g:winManagerWindowLayout='FileExplorer|TagList'
nmap wm :WMToggle<cr>
:set cscopequickfix=s-,c-,d-,i-,t-,e-
nnoremap <silent> <F3> :Grep<CR>
:inoremap ( ()<ESC>i
:inoremap ) <c-r>=ClosePair(')')<CR>
:inoremap { {}<ESC>i
:inoremap } <c-r>=ClosePair('}')<CR>
:inoremap [ []<ESC>i
:inoremap ] <c-r>=ClosePair(']')<CR>
":inoremap < <><ESC>i
":inoremap > <c-r>=ClosePair('>')<CR>
function ClosePair(char)
if getline('.')[col('.') - 1] == a:char
return "\<Right>"
else
return a:char
endif
endf
"配色
" Avoid clearing hilight definition in plugins
if !exists("g:vimrc_loaded")
"Enable syntax hl
syntax enable
" color scheme
if has("gui_running")
" set guioptions-=T
" set guioptions-=m
" set guioptions-=L
" set guioptions-=r
colorscheme fruit
"hi normal guibg=#294d4a
else
colorscheme evening
endif " has
endif " exists(...)
"set background=dark
"显示行号
"set nummber
set nu
"语法高亮度显示
syntax on
"检测文件的类型 开启codesnip
filetype on
filetype plugin on
filetype indent on
set completeopt=longest,menu
set runtimepath+=~/.vim/textmateOnly
set runtimepath+=~/.vim/textmateOnly/after
so ~/.vim/plugin/supertab.vim
"鼠标支持
if has('mouse')
:set mouse=a
endif
"缩进相关
set autoindent
set cindent
set shiftwidth=4
set tabstop=4
set softtabstop=4
set cinoptions={0,1s,t0,n-2,p2s,(03s,=.5s,>1s,=1s,:1s
if &term=="xterm"
set t_Co=8
set t_Sb=^[[4%dm
set t_Sf=^[[3%dm
endif
"在编辑过程中,在右下角显示光标位置的状态行
:set ruler
"显示匹配括号
:set showmatch
"默认无备份
:set nobackup
:set nowritebackup
"在insert模式下能用删除键进行删除
:set backspace=indent,eol,start
"去掉讨厌的有关vi一致性模式,避免以前版本的一些bug和局限
set nocp
" mapping
" 如果下拉菜单弹出,回车映射为接受当前所选项目,否则,仍映射为回车;
"
" 如果下拉菜单弹出,CTRL-J映射为在下拉菜单中向下翻页。否则映射为CTRL-X CTRL-O;
"
" 如果下拉菜单弹出,CTRL-K映射为在下拉菜单中向上翻页,否则仍映射为CTRL-K;
"
" 如果下拉菜单弹出,CTRL-U映射为CTRL-E,即停止补全,否则,仍映射为CTRL-U;
inoremap <expr> <CR> pumvisible()?"\<C-Y>":"\<CR>"
inoremap <expr> <C-J> pumvisible()?"\<PageDown>\<C-N>\<C-P>":"\<C-X><C-O>"
inoremap <expr> <C-K> pumvisible()?"\<PageUp>\<C-P>\<C-N>":"\<C-K>"
inoremap <expr> <C-U> pumvisible()?"\<C-E>":"\<C-U>"a
inoremap <expr> <cr> pumvisible() ? "\<c-y>" : "\<c-g>u\<cr>"
inoremap <expr> <c-n> pumvisible() ? "\<c-n>" : "\<c-n>\<c-r>=pumvisible() ? "\\<down>" : "\\<cr>""
inoremap <expr> <m-;> pumvisible() ? "\<c-n>" : "\<c-x>\<c-o>\<c-n>\<c-p>\<c-r>=pumvisible() ? "\\<down>" : "\\<cr>""
"文字编码加入utf8
set enc=utf8
set fileencodings=utf-8,gb18030,utf-16,big5
"自动缩排
set ai
"搜索不分大小写
set ic
"标识关键字
set hls
"home添加文件头
function Mytitle()
call setline(1,"/**********************************************")
call append(line("."),"作者:自己名字")
call append(line(".")+1,"时间:".strftime("%c"))
call append(line(".")+2,"文件名:".expand("%"))
call append(line(".")+3,"描述:")
call append(line(".")+4,"**********************************************/")
endf
map <home> <Esc>:call Mytitle()<CR><Esc>:$<Esc>o
"设置语法折叠
"set foldmethod=syntax
"set foldcolumn=3 "设置折叠区域的宽度
"set foldclose=all "设置为自动关闭折叠
"设置帮助语言
if version >= 603
set helplang=cn
endif
"自动回到最后编辑的位置
if has("autocmd")
autocmd BufRead *.txt set tw=78
autocmd BufReadPost *
\ if line("'"") > 0 && line ("'"") <= line("$") |
\ exe "normal g'"" |
\ endif
endif
" Line highlight 設此是游標整行會標註顏色
set cursorline
" Column highlight 設此是遊標整列會標註顏色
set cursorcolumn
"highlight CursorLine cterm=none ctermbg=2 ctermfg=0
"ctags设置
set tags=./tags
set tags+=/home/hunch/.vim/sgitag
set tags+=/home/hunch/.vim/ctags
"set tags+=/home/hunch/.vim/glibctag
"智能补全
let OmniCpp_DefaultNamespaces = ["std"]
highlight Pmenu ctermbg=13 guibg=LightGray
highlight PmenuSel ctermbg=7 guibg=DarkBlue guifg=White
highlight PmenuSbar ctermbg=7 guibg=DarkGray
highlight PmenuThumb guibg=Black
"bufferexplorer设置
"实现<C-Tab> 向前循环切换到每个buffer上,并在当前窗口打开
let g:miniBufExplMapCTabSwitchBufs = 1
"<C-S-Tab> 向后循环切换到每个buffer上,并在当前窗口打开
"选中一段文字并全文搜索这段文字
:vnoremap <silent> ,/ y/<C-R>=escape(@", '\\/.*$^~[]')<CR><CR>
:vnoremap <silent> ,? y?<C-R>=escape(@", '\\/.*$^~[]')<CR><CR>
"rails.vim
runtime! macros/matchit.vim
augroup myfiletypes
" Clear old autocmds in group
autocmd!
" autoindent with two spaces, always expand tabs
autocmd FileType ruby,eruby,yaml set ai sw=2 sts=2 et
augroup END
"autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete
autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete
"if you want buffer/rails/global completion you must add the following:
autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
"if you want rails support add the following in addition
autocmd FileType ruby,eruby let g:rubycomplete_rails = 1
"if you want classes included in global completions add the following
autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1