vim

YouCompleteMe can't find local header files

半城伤御伤魂 提交于 2021-02-19 07:43:30
问题 I currently have a project that is structured as so project | |----src/ | | | |----test.cpp | |----include/ | | | |----test.hpp | |----.ycm_extra_conf.py But I can't get YouCompleteMe to recognize test.hpp when it's include in test.cpp #include "test.hpp" This is the output of my :YcmDebugInfo Printing YouCompleteMe debug information... -- Client logfile: /tmp/ycm_tcrryhfo.log -- Server Python interpreter: /usr/bin/python2.7 -- Server Python version: 2.7.14 -- Server has Clang support

Vim: wrap long :make lines in message dialog?

て烟熏妆下的殇ゞ 提交于 2021-02-19 06:23:06
问题 When executing a :make command that displays its content in a temporary vim buffer, is there any way to have these lines soft-wrapped at the edge of the terminal? Most console hosts do not have side scrolling and any long lines that come out of :make are completely truncated in vim (i.e. expanding the terminal width after-the-fact does not recover them). I'm not able to interact with the buffer containing the :make results in any meaningful way ( :set wrap or zl ) that would allow me to

Insert a character after (n) characters and repeat(n) times - vim

允我心安 提交于 2021-02-19 03:46:13
问题 Frequently i receive tickets from our support to make a dhcp reservation on isc-dhcp. Some printers(cof,cof HP) print the mac address information on the test page this way: 002481F33A9C ; and obviously the support guys write this way to the Ticket. I want to change to 00:24:81:F3:3A:9C layout and use an efficient way to do a "insert : after 2 characters 4 times". I know that i can achieve this with macros: qq " start recording -> register q ll " move the cursor 2 characters right i " enter

Cmake Could NOT find PythonLibs

北城以北 提交于 2021-02-18 17:58:26
问题 I'm trying to download YouCompleteMe for Vim on Windows following this tutorial. When calling CMake: cmake -G "Visual Studio 14 Win64" -DPATH_TO_LLVM_ROOT=%USERPROFILE%/ycm_temp/llvm_root_dir . %USERPROFILE%/vimfiles/bundle/YouCompleteMe/third_party/ycmd/cpp It throws the following exception: CMake Error at C:/Program Files/CMake/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is at

Cmake Could NOT find PythonLibs

為{幸葍}努か 提交于 2021-02-18 17:58:18
问题 I'm trying to download YouCompleteMe for Vim on Windows following this tutorial. When calling CMake: cmake -G "Visual Studio 14 Win64" -DPATH_TO_LLVM_ROOT=%USERPROFILE%/ycm_temp/llvm_root_dir . %USERPROFILE%/vimfiles/bundle/YouCompleteMe/third_party/ycmd/cpp It throws the following exception: CMake Error at C:/Program Files/CMake/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is at

Vim bindings for jupyter notebook/lab like Colab

半城伤御伤魂 提交于 2021-02-18 17:34:49
问题 Is there some way to have vim bindings in jupyter notebook/lab like in colab. In the included vim bindings for jupyter Lab, there isn't a NORMAL mode for editing inside the cell block. Colab however has better bindings as it allows use inside the cell block. 来源: https://stackoverflow.com/questions/59746583/vim-bindings-for-jupyter-notebook-lab-like-colab

我的VIM入门感悟

試著忘記壹切 提交于 2021-02-16 23:35:39
学习VIM,这个挑战+学习模式很不错。 http://www.vimgolf.com/challenges/55b18bbea9c2c30d04000001 感觉比较有意思,通过4-6次的follow&try,终于get到一点vim的终极小伎俩。 说点感想, vim 用思维的速度编程,快在于光标移动。 vim的快捷光标移动方法 导致 insert mode/normal mode的分隔,频繁切换模式是很泪的。 但是在文件中做修改就可以尽量少切换模式或不进入insert mode。这样就很快捷了。 记忆,需要和已有知识关联起来,最好有简单统一的规则,这样负担才轻一点。 另外,关于学习教程的思考: 教程入门应该是神奇的案例,而不是手册字典。 学习模式可否通过语音?-耳朵听,手指动。may be a good idea. 来源: oschina 链接: https://my.oschina.net/u/135345/blog/830293

10月12日任务

落爺英雄遲暮 提交于 2021-02-16 20:45:20
10月12日任务 8.6 管道符和作业控制 管道符| 将前一个指令的输出作为后一个指令的输入。 #cat 1.txt |wc -l [root @centos7 ~]# cat 1.txt |wc -l 统计行数 2 [root @centos7 ~]# ls 1.txt 1.xtx 2.txt 3.txt 4.txt a_(2).txt AA.txt anaconda-ks.cfg anaconda-ks.cfg.1 a.txt A.txt bb.txt err temp.1 [root @centos7 ~]# ls |wc -l 统计文件数量 14 #cat 1.txt |grep 'aaa'在1.txt中过滤'aaa',并显示出相关'aaa'的信息。 ctrl z暂停一个任务 假如,在使用#vim 1.txt写入信息时,想退出当前vim窗口去做其他操作又不想影响数据录入,又不想wq退出。这时候可以使用ctrl z去把任务暂停。 [root @centos7 ~]# vim 1.txt [1]+ 已停止 vim 1.txt [root @centos7 ~]# cat 1.txt 1.txt 2.txt jobs查看后台的任务 # jobs [1]- 已停止 vim 1.txt [2]+ 已停止 vim a.txt fg[id]把任务调到前台 #fg 可以把被暂停的任务调出来

10月12日任务

为君一笑 提交于 2021-02-16 19:53:25
8.6 管道符和作业控制 ctrl + z 可以将一个正在前台执行的命令放到后台,并且暂停, fg 将后台中的命令调至前台继续运行 jobs 查看当前有多少在后台运行的命令 bg 将一个在后台暂停的命令,变成继续执行 [root@aming-01 ~]# vim 1.txt [1]+ 已停止 vim 1.txt [root@aming-01 ~]# ls 111.txt Desktop Public anaconda-ks.cfg Documents Templates apr-util-1.6.1.tar.bz2 Downloads Videos apr-util-1.6.1.tar.bz2.gz Music 跟阿铭学Linux第三版.pdf a.txt Pictures [root@aming-01 ~]# fg [root@aming-01 ~]# jobs [1]+ 已停止 vim 1.txt Linux sleep命令可以用来将目前动作延迟一段时间。 8.7/8.8 shell变量 [root@aming-01 ~]# myname='Aming Li' [root@aming-01 ~]# echo $myname Aming Li 双引号""内的特殊字符如$可以保持原有的属性 [root@aming-01 ~]# myname="Aming's" [root

Syntax highlight for .ejs files in vim

三世轮回 提交于 2021-02-15 09:06:43
问题 What is the best way to make vim highlight ejs (http://embeddedjs.com/) files? Is it possible to set up html highlight for the file in general and javascript highlight to it's parts inside <% %>? Appreciate your help! 回答1: Credits goes to @inkedmn just wanted to point out that html binding works way better, therefore put this in your ~/.vimrc file: au BufNewFile,BufRead *.ejs set filetype=html 回答2: Here's something I whipped up today (made some modifications to the eruby script). It requires