vim

Anyway to replace IntelliJ with vim/emacs + commandline?

点点圈 提交于 2019-12-22 13:32:30
问题 I was looking to replace some of the most frequently used settings I have for IntelliJ with vim (or emacs, if needed) & command line tools. I use Auto-import of libraries Deployment of various services in Jetty with debugging (I use breakpoints a lot) Go to declaration, implementation, and tests. JavaLint (?) basically something like PyFlakes for Java which shows warnings, errors in-line I like IntelliJ but have been having a ton of problems with it lately and I miss not being able to use VIM

Anyway to replace IntelliJ with vim/emacs + commandline?

百般思念 提交于 2019-12-22 13:32:18
问题 I was looking to replace some of the most frequently used settings I have for IntelliJ with vim (or emacs, if needed) & command line tools. I use Auto-import of libraries Deployment of various services in Jetty with debugging (I use breakpoints a lot) Go to declaration, implementation, and tests. JavaLint (?) basically something like PyFlakes for Java which shows warnings, errors in-line I like IntelliJ but have been having a ton of problems with it lately and I miss not being able to use VIM

How to execute a normal mode command in a vim function?

99封情书 提交于 2019-12-22 12:23:49
问题 I am writing a vim function to insert some text in a c++ file, please see the following function: function! InsertDebugInfo() let i = line('.') call append(i+1, '#ifdef DEBUG') call append(i+2, 'std::cout << "" << std::endl;') call append(i+3, '#endif') call append(i+4, '') call cursor(i+3, 0) endfunction In normal mode, I use == to re-indent one code line. My question is how to call == in the above function. Furthermore, how to execute the command such as 2f" which move the cursor to the

K8s资源第五篇(volume存储卷)

橙三吉。 提交于 2019-12-22 10:55:27
Kubernetes Volume  Kubernetes提供的存储卷属于Pod资源级别,共享于Pod内的所有容器,可用于再容器的文件系统之外存储应用存储的相关数据,也可以独立Pod生命周期之外实现数据的持久化。 K8s的volume类型 emptyDir:翻译过来是空目录,相当于是临时存储卷,容器挂了,目录也就挂了,数据不能做到持久化。 hostPath:把Pod做运行在的宿主机的目录与该Pod建立关系,数据不会因为Pod挂了而丢失,但是如果节点宕机的话,数据就会丢失。 gitRepo:将git仓库挂载到容器内,但是如果git仓库的内容发生改变,容器内的数据不会跟着改变。只是挂载git仓库某一时刻的数据。 nfs:挂载nfs的目录到容器里,这样即使节点和容器都宕机,数据也能够得到保存。 configmap:用来将环境变量,配置信息注入到Pod中。 secret:和configmap类型,但是在secret中的数据是以base64加密过的,用来存放敏感数据(证书密钥文件,数据库密码等)。 emptyDir(临时存储卷):  emptydir是Pod生命周期的一个临时目录,生命周期跟随Pod的生命周期,也就是说如果Pod死了,emptyDir也就死了。 #定义一个临时存储卷。 [root@k8smaster data]# vim pod-vol-demo.yaml

Send literal string from python-vim script to a tmux pane

▼魔方 西西 提交于 2019-12-22 10:46:32
问题 I am using Vim (8.0) and tmux (2.3) together in the following way: In a tmux session I have a window split to 2 panes, one pane has some text file open in Vim, the other pane has some program to which I want to send lines of text. A typical use case is sending lines from a Python script to IPython session running in the other pane. I am doing this by a Vim script which uses python, code snippet example (assuming the target tmux pane is 0): py import vim python << endpython cmd = "print 1+2"

Porting a markdown-live-preview-in-vim plugin from *nix to Windows

元气小坏坏 提交于 2019-12-22 10:37:56
问题 I need your help. Because I've no idea what I'm doing. There is this nice plugin vim-instant-markdown I recently stumbled onto. Basically, it's a live preview in a browser, running in the background, while you're writing your text in markdown plugin, and I like the concept. So, I've tried to get it to work on Windows, installed Ruby (rubyinstaller-1.9.3-p125) installed Ruby-DevKit (DevKit-tdm-32-4.5.2-20111229-1559-sfx) followed instructions on https://github.com/oneclick/rubyinstaller/wiki

How to collapse concealed text?

戏子无情 提交于 2019-12-22 10:05:46
问题 The problem is as follows: This is about a plain .txt file I have enabled the conceal feature and created this syntax file: set conceallevel=3 syn region cTest conceal start='€£' end='£€' hi cTest ctermfg=DarkYellow I write first a summary/skeleton of what I want to say, and put it in between €£ and £€. Then, in the same line, I write a lengthier text following the guidelines of the summary. The whole file contains many (>100) lines. The conceal feature works very nicely, except for one point

Can I pass a string as stdin to a system call from vim?

◇◆丶佛笑我妖孽 提交于 2019-12-22 09:49:24
问题 I want to run a system command from vim ( :help :! ), and I want to pass the contents of a string variable as stdin for that command. I already know I can pass lines from the current buffer as stdin (see :help :w_c ). But I don't want to modify the current buffer, and I don't want to make a new buffer. I know I can write the string to a temporary file, then pipe that file as input and delete it. Right now, that's the best solution I know for my application. But it would be cleaner to avoid

force vim to overwrite external changes

放肆的年华 提交于 2019-12-22 09:30:08
问题 I use Vim 7.4 (Mac OS) to edit and run Lua scripts. I've mapped a key in my .vimrc to save the current buffer and run an external script. The key map in .vimrc: map V :w!<CR> :!python "$HOME/tools/client/concli.py" --lua %<CR> It works fine but every once in a while the files are 'touched' by Xcode (touch shell command). Then when I hit the mapped key vim warns me that the file has been changed externally and I have to confirm to write to it. This is quite annoying since the files are often

remove newlines from a register in vim?

a 夏天 提交于 2019-12-22 09:05:41
问题 I have a long list of different names of universities. I'm trying to build a synonym table by collating lines with certain unique keywords; that is, in the file, I'll identify that Harvard is the keyword here: Harvard Business School| Harvard College| Harvard School of Divinity| and paste them into another file as Harvard Business School|Harvard College|Harvard School of Divinity| I have been doing this by searching for the word under the cursor, yanking lines with that word into register,