Ericz 2022-07-06 10:47
浏览 20
已结题

vim配置问题是否可以如此配置vim

set ai
set nu
set incsearch
set hlsearch
set wildmenu
set lazyredraw
set path+=/code/activity/kernel/include
set path+=
/code/activity/hardware/libhardware/include/hardware

set fileencodings=utf-8,gb2312,gbk,gb18030
set termencoding=utf-8
set encoding=utf-8
set fileformats=unix
"set showmatch
filetype plugin indent on

if filereadable("tags")
set tags=tags
elseif filereadable("tags")
set tags=tags
elseif filereadable("tags")
set tags=.tags
elseif filereadable("tags")
set tags=tags
else
set tags=/code/activity/kernel/tags
set tags+=
/code/activity/vendor/audiodsp/tags
endif

if has("cscope")
if filereadable("cscope.out")
cscope add cscope.out
else
"let cscope_file=findfile("cscope.out", ".;")
"let cscope_pre=matchstr(cscope_file, ".*/")
"exe "cs add cscope_file cscope_pre"
exe "cs add code/activity/kernel/cscope.out /home/code/activity/kernel/"
exe "cs add code/activity/vendor/audiodsp/cscope.out /home/code/activity/vendor/audiodsp/"
endif
endif

"set expandtab
"set tabstop=8
"set smarttab

if has("autocmd")
au BufReadPost * if line("'"") > 1 && line("'"") <= line("$") | exe "normal! g'"" | endif
endif

let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
let Tlist_Auto_Open=1

" auto add log
kf(hwbywnoeric_print("a start\n");

ab do{ do { }while();$a
"iab if( if( ) {} else {}4kf(a

"-
" cscope map
" cs find s 查找C语言符号,即查找函数名、宏、枚举值等出现的地方
" cs find g 查找函数、宏、枚举等定义的位置,类似ctags所提供的功能
" cs find c 查找调用本函数的函数
" cs find t 查找指定的字符串
" cs find e 查找egrep模式,相当于egrep功能,但查找速度快多了
" cs find f 查找并打开文件,类似vim的find功能
" cs find i 查找包含本文件的文
" cs find d 查找本函数调用的函数
"-
"
nmap <C->s :cs find s =expand("")
nmap <C->g :cs find g =expand("")
nmap <C->c :cs find c =expand("")
nmap <C->t :cs find t =expand("")
nmap <C->e :cs find e =expand("")
nmap <C->f :cs find f =expand("")
nmap <C->i :cs find i ^=expand("")$
nmap <C->d :cs find d =expand("")

"taglist.vim visualmark.vim

  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 7月14日
    • 修改了问题 7月6日
    • 创建了问题 7月6日

    悬赏问题

    • ¥15 R语言Rstudio突然无法启动
    • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
    • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
    • ¥15 用windows做服务的同志有吗
    • ¥60 求一个简单的网页(标签-安全|关键词-上传)
    • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
    • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
    • ¥100 为什么这个恒流源电路不能恒流?
    • ¥15 有偿求跨组件数据流路径图
    • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值