yangyangwithgnu / use_vim_as_ide Goto Github PK
View Code? Open in Web Editor NEWuse vim as IDE
License: Creative Commons Zero v1.0 Universal
use vim as IDE
License: Creative Commons Zero v1.0 Universal
请问这个是用哪个版本的GCC编译
首先感谢这么棒的教程~~
不过在用
autocmd BufWritePost $MYVIMRC source $MYVIMRC
来实现保存时自动加载~/.vimrc时,底部状态栏的配色会消失(推测与之相关的插件是vim-powerline)。不知道您有遇到过类似问题没有?
您好,请问,您是用的Ubuntu配GVim么?
这里能给出相应的安装地址和说明? 先谢过 ,初学者很多出现问题都不知道是不是这里的原因导致
cxa_exception.o:/home/rosa/Downloads/libcxxabi/lib/../src/cxa_exception.cpp:708: first defined here
clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation)
https://github.com/universal-ctags/ctags
前者已经很久没人维护了,后者持续维护中,并且对各个平台都有预编译包,基本没有切换成本。
"预先安装相关依赖库的头文件,python-devel、python3-devel、ruby-devel、libX11-devel、gtk-devel、gtk2-devel、gtk3-devel、ncurses-devel"
谷歌了一下没有很理想的答案
RT
希望完善YCM安装一节
方便更多读者使用
源码编译YCM费时费力,
一些Linux 发行版已经有了编号好的二进制包,
Ubuntu Debian 都有deb包,
openSUSE 的OBS源里面也有现成的,
Debian:
https://tracker.debian.org/pkg/ycmd
https://tracker.debian.org/pkg/vim-youcompleteme
Ubuntu:
https://launchpad.net/ubuntu/+source/ycmd
https://launchpad.net/ubuntu/+source/vim-youcompleteme
openSUSE:
http://software.opensuse.org/package/vim-youcompleteme-ycmd?search_term=ycmd
http://software.opensuse.org/package/vim-youcompleteme
https://github.com/yyzybb/cppenv
我基于libclang和python-clang做了一个自动生成类成员函数definition的snippet. 希望可以帮到更多的C++er
作者好,
我已经按照你的文档配置好了vim,现在碰到了一个问题麻烦你帮忙看一下到底是什么原因
我写了一个头文件,语法都是正常的,使用这个头文件编译全都没有问题,
报的错误是这样:
E706: Variable type mismatch for: pseudotag
Error detected while processing function 44_AutoUpdate..44_ProcessFile..44_AddScopedTags..44_AddScopedTags..44_ProcessPseudoTag..44_CreatePseudoTag..154:
line 13:
E716: Key not present in Dictionary: g
Error detected while processing function 44_AutoUpdate..44_ProcessFile..44_AddScopedTags..44_AddScopedTags..44_ProcessPseudoTag..44_CreatePseudoTag..154:
line 13:
E15: Invalid expression: fileinfo.kindfolds[self.fields.kind]
Error detected while processing function 44_AutoUpdate..44_ProcessFile..44_AddScopedTags..44_AddScopedTags:
line 37:
E706: Variable type mismatch for: pseudotag
Error detected while processing function 44_AutoUpdate..44_ProcessFile..44_AddScopedTags..44_AddScopedTags..44_ProcessPseudoTag..44_CreatePseudoTag..154:
line 13:
E716: Key not present in Dictionary: g
Error detected while processing function 44_AutoUpdate..44_ProcessFile..44_AddScopedTags..44_AddScopedTags..44_ProcessPseudoTag..44_CreatePseudoTag..154:
line 13:
E15: Invalid expression: fileinfo.kindfolds[self.fields.kind]
Error detected while processing function 44_AutoUpdate..44_ProcessFile..44_AddScopedTags..44_AddScopedTags:
line 37:
E706: Variable type mismatch for: pseudotag
只有在打开我自己写的一个特定的头文件的时候会这样,其他的文件都没有问题
这个到底是什么地方出了问题啊?每次都自动的不停地弹出来
In file included from /home/lancelot/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/CandidateRepository.cpp:28:0:
/home/lancelot/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/ClangCompleter/CompletionData.h:23:27: fatal error: clang-c/Index.h: No such file or directory
compilation terminated.
ycm/CMakeFiles/ycm_client_support.dir/build.make:123: recipe for target 'ycm/CMakeFiles/ycm_client_support.dir/CandidateRepository.cpp.o' failed
make[3]: *** [ycm/CMakeFiles/ycm_client_support.dir/CandidateRepository.cpp.o] Error 1
CMakeFiles/Makefile2:130: recipe for target 'ycm/CMakeFiles/ycm_client_support.dir/all' failed
make[2]: *** [ycm/CMakeFiles/ycm_client_support.dir/all] Error 2
CMakeFiles/Makefile2:209: recipe for target 'ycm/CMakeFiles/ycm_support_libs.dir/rule' failed
make[1]: *** [ycm/CMakeFiles/ycm_support_libs.dir/rule] Error 2
Makefile:148: recipe for target 'ycm_support_libs' failed
make: *** [ycm_support_libs] Error 2
我看到你的文档中定义了很多快捷键, 我也跟着你使用了该种快捷键. 我想问问这个快捷键是不是国际通用的呀? 以后使用别人的vim不方便呀!
请问手动编译的vim要怎么开启"+y复制到剪切板功能?按照博主介绍的./configure参数编译出来的设置的复制粘贴快捷键之后不可用。
从文可以看到作者更偏向MS方向的c,pragram once应该是只有MS才有的命令吧。
感谢作者的劳动,我已经从头到尾读完。
各位,我花了几天的时间研究了一下ycm的配置,操作系统为fedora24,我主要是用于编写linux下面的c程序,我的配置过程如下:
1、dnf install vim python-devel python3-devel boost-devel cmake gcc-c++ ctags
2、下载.vimrc及.ycm_extra_conf.py,使用bundle安装插件
3、下载clang+llvm-3.9.0-x86_64-fedora23.tar.xz
4、
cd downloads/
mkdir ycm_build
cd ycm_build
cmake -G "Unix Makefiles" -DUSE_SYSTEM_BOOST=ON -DPATH_TO_LLVM_ROOT=~/downloads/clang+llvm/ .
~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp
cmake --build . --target ycm_core
安装完成后有ycm_core.so、libclang.so ,无ycm_client_support.so,查看ycm的官方说明,目前ycm_client_support.so不是必须的了。
5、.vimrc中加入“ let g:ycm_global_ycm_extra_conf='/home/sdt/.ycm_extra_conf.py'”
6、配置完成后,启动vim,执行:ycmdebuginfo,提示如下
Printing YouCompleteMe debug information...
-- Server has Clang support compiled in: True
-- Clang version: clang version 3.9.0 (tags/RELEASE_390/final)
-- C-family completer debug information:
-- Configuration file found and loaded
-- Configuration path: /home/sdt/.ycm_extra_conf.py
-- Flags: ['-std=c++11', '-O0', '-Werror', '-Weverything', '-Wno-documentation', '-Wno-deprecated-declarations',
'-Wno-disabled-macro-expansion', '-Wno-float-equal', '-Wno-c++98-compat', '-Wno-c++98-compat-pedantic', '-Wno-globa
l-constructors', '-Wno-exit-time-destructors', '-Wno-missing-prototypes', '-Wno-padded', '-Wno-old-style-cast', '-W
no-weak-vtables', '-x', 'c++', '-I', '/home/sdt/.', '-isystem', '/usr/include/', '-resource-dir=/home/sdt/.vim/bund
le/YouCompleteMe/third_party/ycmd/ycmd/../clang_includes', '-fspell-checking']
-- Server running at: http://127.0.0.1:47190
-- Server process ID: 8166
-- Server logfiles:
-- /tmp/ycmd_47190_stdout_2uhaw_11.log
-- /tmp/ycmd_47190_stderr_r2g15550.log
应该算是配置成功了。
我觉得可能有点问题,并且希望增加功能两个地方是:
1、
现象:我在书写函数或者类名时,需要使用C-X C-O快捷键才会提示,而不是在我输入几个字母后自动提示。比如我输入pthread_之后,按C-X C-O,才会提示线程相关函数。结构体也是如此。
问题:是否我的配置还有遗漏和缺失的地方呢?
希望:是否可以将提示功能更加完善,再输入函数前几个字母的时候,便可以自动弹出提示函数、结构体、变量等。
2、
现象:在我补全完函数,输入(后,函数提示便消失了,再次按C-X C-O也未出现。这样会导致我第一次执行C-X C-O时,我需要记住函数里的参数,否则便无法再进行提示了。
问题:如上所说,输入(后,无法提示函数参数了。
希望:是否可以改进此功能,或者也是我的配置出现问题。如果配置正确的话,是否可以一直有函数参数的提示功能,并且如果可以出现在下方状态栏的话,更为方便。
3、如果我希望补全系统函数,是否还需要在/usr/include下使用ctags生成tags文件呢?并且是否要使用set tags+=方式引入到vimrc中呢?
4、目前.ycm_extra_conf.py使用的是github中提供的,里面多是c++配置选项,如果是用于c编写,是否可以有参考的样例呢?如果是个人的一些工程,比如opensll的项目,是否要将对应的include目录以如下方式写入.ycm_extra_conf.py?
'-isystem',
'/openssl/include/',
是否可以收集一些关于java,js,python等相关的配置文件的收集呢?
5、另外,对于代码提示时的背景颜色和字体颜色,在哪里设置呢?
6、另外,我在书写程序时,在结构体,函数名称后面会有如下奇怪的东西。
"zc_pro"后面的[id]是什么东西?按下C-X C-O才会有函数提示。
谢谢大家!
So, why not just sth that download then work . We need a tool, not how to build a tool.
当添加nmap lb 0 或nmap le $后,会导致使用 l 移动光标,再使用x删除字符错位。x将删除光标后一个字符,而不是当前的字符。
vim 7.4.52, 当.vimrc文件中仅仅只存在这两条映射时仍然是这样。
首先感谢作者的辛苦付出,这么棒的教程。我这边想问个问题,就是设置显示/隐藏标签列表子窗口的快捷键nnoremap ilt :TagbarToggle 后,测试时候,你后面说“重启 vim 后,打开一个 C/C++ 源码文件,键入 ilt,将在左侧的 tagbar 窗口中将可看到标签列表:”,那么请问是怎么键入ilt会出来这个效果的,键入i的时候就变成插入了啊?谢谢解答
\ 'l:local:0:0'
\ ] 这儿
\ 'sro'
使用plugin install 之后 vim 自动安装的YCM里面貌似依赖的是boost 1.61 。。。然后各种报错,尴尬
如果直接vim file.cpp 能使用 ;rw替换;
但是如果是打开vim再, 使用;rw替换,就会报这个错,
E163: There is only one file to edit
分析后发现是Replace函数使用的是argdo对加入参数的文件有效;
为啥不使用bufdo呢?
在第7点 工具链集成的时候,我按你这边的步骤来但到了执行下面这句出现"bash: ../configure: 没有那个文件或目录"
../configure --enable-optimized CC=/usr/bin/GCC CXX=/usr/bin/g++
让后我又按官方 http://clang.llvm.org/get_started.html
这一步 Building Clang and Working with the Code
发现当执行到
Build LLVM and Clang:
mkdir build (in-tree build is not supported)
cd build
cmake -G "Unix Makefiles" ../llvm
make
在编译到53%左右出现了错误
Linking CXX shared library ../../../lib/libc++.so
CMakeFiles/cxx.dir//src/future.cpp.o:在函数‘std::__1::future_category()’中:
/usr/llvm/projects/libcxx/src/future.cpp:71:对‘__cxa_guard_acquire’未定义的引用
/usr/llvm/projects/libcxx/src/future.cpp:71:对‘__cxa_guard_release’未定义的引用
CMakeFiles/cxx.dir//src/future.cpp.o:在函数‘std::1::__assoc_sub_state::set_value()’中:
/usr/llvm/projects/libcxx/src/future.cpp:97:对‘__cxa_allocate_exception’未定义的引用
/usr/llvm/projects/libcxx/src/future.cpp:97:对‘__cxa_throw’未定义的引用
/usr/llvm/projects/libcxx/src/future.cpp:97:对‘__cxa_free_exception’未定义的引用
CMakeFiles/cxx.dir//src/future.cpp.o:在函数‘std::1::__assoc_sub_state::set_value_at_thread_exit()’中:
/usr/llvm/projects/libcxx/src/future.cpp:109:对‘__cxa_allocate_exception’未定义的引用
/usr/llvm/projects/libcxx/src/future.cpp:109:对‘__cxa_throw’未定义的引用
/usr/llvm/projects/libcxx/src/future.cpp:109:对‘__cxa_free_exception’未定义的引用
CMakeFiles/cxx.dir//src/future.cpp.o:在函数‘std::1::__assoc_sub_state::set_exception(std::exception_ptr)’中:
/usr/llvm/projects/libcxx/src/future.cpp:121:对‘__cxa_allocate_exception’未定义的引用
/usr/llvm/projects/libcxx/src/future.cpp:121:对‘__cxa_throw’未定义的引用
/usr/llvm/projects/libcxx/src/future.cpp:121:对‘__cxa_free_exception’未定义的引用
CMakeFiles/cxx.dir//src/future.cpp.o:在函数‘std::1::__assoc_sub_state::set_exception_at_thread_exit(std::exception_ptr)’中:
/usr/llvm/projects/libcxx/src/future.cpp:134:对‘__cxa_allocate_exception’未定义的引用
/usr/llvm/projects/libcxx/src/future.cpp:134:对‘__cxa_throw’未定义的引用
/usr/llvm/projects/libcxx/src/future.cpp:134:对‘__cxa_free_exception’未定义的引用
CMakeFiles/cxx.dir//src/future.cpp.o:在函数‘std::__1::__assoc_sub_state::__execute()’中:
/usr/llvm/projects/libcxx/src/future.cpp:185:对‘__cxa_allocate_exception’未定义的引用
/usr/llvm/projects/libcxx/src/future.cpp:185:对‘__cxa_throw’未定义的引用
/usr/llvm/projects/libcxx/src/future.cpp:185:对‘__cxa_free_exception’未定义的引用
.............................
.............................
.............................
求解决! 先谢过了..
Because Vundle is easier to manage plugin updates, maybe adding Vundle support is better.
这篇文章写得非常棒,通篇看完了并配置好了。然而有个问题,我在服务器上需要编写c++、java、以及python的代码,我现在按照这个教程已经配置好c++的了,但我如果需要添加python的代码错误提示,我该怎么修改配置?是直接把python代码错误检测的插件添加到本文的.vimrc的plugins里吗还是?(小弟第一次使用vim,如果此问题太小白,大神别见怪。。)
使用8.0原生异步 API,提供异步git push,异步编译,异步更新 tags, 异步 grep 等功能,完美代替 vim-dispatch: https://github.com/skywind3000/asyncrun.vim
vundle 环境设置内容中贴出的.vimrc脚本里面,"BOOKMARKS"与“Mark”之间应该是双短横线。
vim-protodef快捷键使用不了,默认是PP, 但是P在vim中不是粘贴吗?所这个这个插件不能用,问下作者你怎么用的?
你好,文章里写到安装相关的依赖库文件,我在包管理器里安装了相关的python-devel、python3-devel、ruby-devel、lua-devel、libX11-devel、gtk-devel、gtk2-devel、gtk3-devel、ncurses-deve等,编译之前在./configure
A repository without at least a short English description looks uninviting.
There should be at least the list of IDE features the project brings into Vim.
As far as I see from screenshots, it's
It is hovewer not clear which languages does the project support, and whether aids for refactoing, build system integration, debugging, testing and deployment are in scope of the project.
Ideally there should be a link to fully translated English README page near the top of default README.
书签设定:m[a-zA-Z]
书签罗列:m/
书签跳转:
]`��� :跳转到下一个书签
[`: 跳转到前一个书签
if $SHELL =~ 'bin/fish'
set shell=/bin/sh
endif
我用的是fish,安装软件报错,网上查到的解决方案,建议加到里面去
文中提到:
" 定义快捷键的前缀,即<Leader>
let mapleader=";"
如果把<Leader>
定义成了分号, 那么 f{char}
的时候又怎么到下一次匹配呢? 因为这个的默认快捷键就是 ;
我使用的是mac pro. OSX EI Capitan 10.11.6
自带的vim是7.3,个人不喜欢homebrew,所以我参考了知乎-Mac自带的Vim怎么升级?尝试了两种方式升级,效果相同:
sudo port install vim +python27
git clone [email protected]:vim/vim.git
cd vim/src
make distclean
./configure --with-features=huge --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-perlinterp --with-python-config-dir=/usr/lib/python2.7/config/ --enable-gui=gtk2 --enable-cscope
make
sudo make install
成功在 /user/local/bin
下看到安装成功的vim
# brian @ brianway in ~ [0:48:44]
$ ll /usr/local/bin
total 4768
lrwxr-xr-x 1 brian staff 65B 8 7 20:54 docker -> /Users/brian/Library/Group Containers/group.com.docker/bin/docker
lrwxr-xr-x 1 brian staff 73B 8 7 20:54 docker-compose -> /Users/brian/Library/Group Containers/group.com.docker/bin/docker-compose
lrwxr-xr-x 1 brian staff 73B 8 7 20:54 docker-machine -> /Users/brian/Library/Group Containers/group.com.docker/bin/docker-machine
lrwxr-xr-x 1 root wheel 3B 8 28 00:17 ex -> vim
lrwxr-xr-x 1 brian staff 65B 8 7 20:54 notary -> /Users/brian/Library/Group Containers/group.com.docker/bin/notary
lrwxr-xr-x 1 root wheel 3B 8 28 00:17 rview -> vim
lrwxr-xr-x 1 root wheel 3B 8 28 00:17 rvim -> vim
-rwxr-xr-x 1 root wheel 544B 6 18 01:12 update_rubygems
lrwxr-xr-x 1 root wheel 3B 8 28 00:17 view -> vim
-rwxr-xr-x 1 root wheel 2.3M 8 28 00:25 vim
lrwxr-xr-x 1 root wheel 3B 8 28 00:17 vimdiff -> vim
-rwxr-xr-x 1 root wheel 2.0K 8 28 00:25 vimtutor
-rwxr-xr-x 1 root wheel 18K 8 28 00:25 xxd
在:PluginInstall
,卡在YouCompleteMe安装处,一直是processing, 再进入vim提示YouCompleteMe unavailable: No module named future
查了一些解决方案也没有解决
kali 2016.2
终端是背景半透明的,vim下有字的地方是不透明的,没字的地方背景是和终端一样半透明的
可不可以设置有字的地方也半透明,就是背景设置和终端设置的一样
刚开始学 轻喷
您好,按照你的文档,已经把相应的功能都已配置。请问您在工作中,是如何动态调试源码的?
我按照教程加参数编译 vim 8 后在 vim 里输入 :echo has('python') 输出的值为0
" 设置快捷键将系统剪贴板内容粘贴至 vim
nmap p "+p
" 定义快捷键在结对符之间跳转,助记pair
nmap pa %
粘贴的时候觉得延迟,然后发现 粘贴快捷键 是 结对符跳转快捷键 的前缀
我自己把结对符的快捷键注释了,感觉百分号按起来还算顺手~(^__^)
感谢这份教程!作者巨巨辛苦了~!
当我使用Ctrl+Alt+Fn换到字符界面时发现配色全没了,全是些淡蓝色????用的Ubuntu系统,还有楼主的插件管理为什么不使用Vundle?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.