vim

How to disambiguate vim commands from shell commands

混江龙づ霸主 提交于 2019-12-24 18:13:18
问题 From How to easily escape a command-line filter: And actually, this has been a bit of an XY problem. I'll have to post the original problem in a different question, though, because the Y question is really interesting and I would like to know. I'll post a link to the X question in the comments. This is the "X" question. I had thought that by figuring out how to escape the % , I would solve the problem, but it turns out Vim's behavior goes deeper than I had thought. And that is that apparently

Adding carriage return in a map instruction in gVim

蹲街弑〆低调 提交于 2019-12-24 17:29:42
问题 After copying my .vimrc file over to windows I noticed there were a lot of problems. I fixed most of them, but I noticed anything with a <CR> command in it does not work. I just get a "ding" sound. Here is an example of one command which causes no errors, but doesn't do what it's supposed to. I just get the ding sound let mapleader = "," let g:mapleader = "," nmap <leader>w :w!<cr> Am I supposed to use something instead fo <CR> ? Note, I did google it 回答1: I see nothing wrong with your config

Navigate through vim's preview window

别来无恙 提交于 2019-12-24 17:00:52
问题 I am working on a Python project using Vim with YouCompleteMe code completion. The thing is most of the docstrings don't fit in the preview window. Is it possible to increase the preview window height or navigate through it? 回答1: You can find all the info you need on the preview window in: :help preview-window Take a look at the previewheight option: :help 'previewheight' 来源: https://stackoverflow.com/questions/34132809/navigate-through-vims-preview-window

using xargs vim with gnu screen

强颜欢笑 提交于 2019-12-24 16:39:03
问题 I've got a weird problem where if i do something like this in a gnu screen window, that window starts responding in weird ways ls *.cpp | xargs vim After I exit from vim, the screen window doesn't echo any command. It even does not echo CR. Any suggestions? 回答1: Piping changes vim's stdin and causes problems. Try this instead (for bash, zsh, etc.): vim $(find . -name "*.cpp") 回答2: How about vim *.cpp ? Maybe for file in *.cpp; do vim "$file"; done could work too. Edit each file and exit. Or

Strange symbol in vim command line after start

旧巷老猫 提交于 2019-12-24 15:48:08
问题 I'm using Kubuntu 15.10, konsole and vim. When I initially start vim in konsole, i get strange symbols ("115;0c") in my command line, which is really annoying. i tried "set term=konsole" setting in my .vimrc but i got this E558: Terminal entry not found in terminfo 'konsole' not known. Available builtin terminals are: builtin_gui builtin_amiga builtin_beos-ansi builtin_ansi builtin_pcansi builtin_win32 builtin_vt320 builtin_vt52 builtin_xterm builtin_iris-ansi builtin_debug builtin_dumb

linux远程登录(使用Telnet、SSH)

◇◆丶佛笑我妖孽 提交于 2019-12-24 15:33:31
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 系统:RHEL 5.5 64位,使用CentOS的yum源并作更新处理 一、Telnet(远程登录推荐SSH) 1、安装、启动Telnet 1.1、安装和启动一般需要两个包: telnet-client提供客户端程序 telnet-server提供服务器端程序 1.2、安装之前,确定是否已经安装Telnet [root @localhost Server]# rpm -qa|grep telnet telnet-server-0.17-39.el5 telnet-0.17-39.el5 说明已经安装,若未安装,可挂载RHEL5.5的DVD光盘镜像,在Server文件夹下找到并安装下面三个包: [root @localhost Server]# rpm -ivh xinetd-2.3.14-10.el5.x86_64.rpm #先安装这个包 [root @localhost Server]# rpm -ivh telnet- telnet-0.17-39.el5.x86_64.rpm telnet-server-0.17-39.el5.x86_64.rpm #这两个包的安装顺序是从左到右依次安装 1.3、启动: 方法一: 用# setup命令,选择系统服务,在里面找到Telnet,用空格键选中(前面加*)

vim left and right column highlight

久未见 提交于 2019-12-24 15:29:45
问题 I need to highlight anything beyond column 72 with a different background color. What's the best method? Something similar to a visible line margin that some editors do is also good. Is it possible? Some background: The syntax is a Pascal like, and works correctly. Only the Background needs to change. The foreground is already highlighted as it should be. There are cases where a String will be more than 80 characters and will pass the 72 column limit, and should be highlighted as a string.

Binding PHP documenter script to <C-P> in Vim

半城伤御伤魂 提交于 2019-12-24 15:22:07
问题 As suggested in an answer here: VIM Insert PHPdoc automatically I was trying to bind Ctl p to the PHP documenter script in order to generate comments. I used these lines at the end of my .vimrc file: " PHP documenter script bound to Control-P autocmd FileType php inoremap <C-P> <ESC>:call PhpDocSingle()<CR>i autocmd FileType php nnoremap <C-P> :call PhpDocSingle()<CR> autocmd FileType php vnoremap <C-P> :call PhpDocRange()<CR> But when I press Ctl p , the cursor goes to the line before and

RHEL8 Linux文件管理 Day2 aom

喜夏-厌秋 提交于 2019-12-24 14:49:57
########## LINUX下的文件管理 ####################开始开始,今天绝对在状态########## 学习目标: 1 文件建立及删除 2 文件编辑 3 文件查看 4 文件复制及移动 5 文件统计 6 Linux系统结构及二级目录信息 7 文件寻址 8 寻址相关命令 9 文件批处理技术 一、 文件建立及删除 Linux特性:Everything is file ##都是文件! 在Linux中对系统管理归根到底就是 对文件进行管理 ##增删改查 Linux下对文件的建立: touch :通常在系统中用于建立文件或者修改时间戳 ## watch -n 1 stat filename stat filename 查看时间戳 access time | modify time | change time (打开文件变动) (修改内容变动) (改属性或内容变动) linux目录的建立: mkdir -p (有层级时)dir1/dir2/dir3 #dir1不存在时,dir2/dir3无法建立,加-p(parents)即可 linux下文件的删除: rm -f file1 file2 #-f强制删除,不询问 rm -fr dir1 dir2 #-r表示递归删除,不加时目录下有内容不可删除 二、 文件编辑 1 gedit file #直接编辑文件,类似txt记事本 2

why :%s/^$//g is not equal to :g/^$/d in vim?

拥有回忆 提交于 2019-12-24 14:47:29
问题 I want to delete blank lines in the file in gvim for windows (not vim from cygwin). :g/^$/d # delete all blank lines correctly :%s/^$//g #can not delete all blank lines It's a problem how to express the end of line , i have checked my file in detail with the command %!xxd , i found there is a 0d0a at the end of every line, when the end of line is expressed by the special character $ , does it contain the 0d0a ? it is different to express concept of the end of line betwwen command g and s ? :