vim

ELK 5.1.2 安装配置

◇◆丶佛笑我妖孽 提交于 2019-12-21 03:58:59
环境:(elasticsearch-5.1.2 elasticsearch-head logstash-5.1.2 kibana-5.1.2)+supervisor-3.3.1+centos 6.8 一、准备工作 yum -y install java-1.8.0-openjdk # 配置java环境变量,添加如下内容: vim /etc/profile export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk.x86_64 export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$PATH:$JAVA_HOME/bin # 修改系统参数 vim /etc/security/limits.conf * soft nofile 65536 * hard nofile 131072 * soft nproc 2048 * hard nproc 4096 vim /etc/security/limits.d/90-nproc.conf * soft nproc 2048 root soft nproc unlimited vim /etc/sysctl.conf vm.max_map_count

Can you force Vim to show a blank line at the end of a file?

痴心易碎 提交于 2019-12-21 03:43:22
问题 When I open a text file in Notepad, it shows a blank line if there is a carriage return at the end of the last line containing text. However, in Vim it does not show this blank line. Another thing I've noticed is that the Vim editor adds a carriage return to the last line by default (even though it doesn't show it). I can tell, because if I open a file in Notepad that was created in Vim, it shows a blank line at the end of the file. Anyway, I can live with these two differences, but I'm

How can I go to end of parenthesis/brackets/quotes without switching insert mode in Vim?

笑着哭i 提交于 2019-12-21 03:40:16
问题 I'm looking for a plugin that makes you get out of parenthesis/brackets/quotes/etc when you're inside them. I find it kind of hard having to ESC to command mode and typing A to get out of the parenthesis to go to the end of the line in Insert mode, is there a plugin that meets my needs? 回答1: A plugin would be overkill. Add this mapping to your ~/.vimrc : inoremap <C-e> <C-o>A <C-o> is used to issue a normal mode command without leaving insert mode. A , well… you know what it does. 回答2: If you

Vim : Highlight the word TODO for every filetype

守給你的承諾、 提交于 2019-12-21 03:36:11
问题 I would like to highlight the word TODO in vim, no matter what file is edited (code or normal text). It currently works for many different languages (for example, TODO is highlighted in C/Java comments by default), but I use vim for non-code text files and I would like to see the TODOs highlighted for them too. What is the easiest way to do that ? 回答1: Highlighting TODO for every filetype and without possibly breaking other syntax rules can be done only by using :match / matchadd() : augroup

Vimscript check if current buffer has unsaved changes

廉价感情. 提交于 2019-12-21 03:35:17
问题 I currently have my status line set up so that it's orange in insert mode and white otherwise. I'd like to make it go another color when I drop back to normal mode if the file has any unsaved changes, as I regularly take a little walk down a rabbit hole wondering why my changes have not taken effect. The little "[+]" doesn't smack me in the face enough ;) I can't find any functions that start with "buf" and look like predicates for dirtiness though. I assume one exists, but is named something

Vim error E510: Can't make backup file (add ! to override)

淺唱寂寞╮ 提交于 2019-12-21 03:32:39
问题 I am using Vim on Windows and decided to create a separate directory for all my backup files created by vim. I am using Vim from my command prompt and not using the vim GUI(gVim). I looked at this post and added the following lines in my _vimrc set backup set backupdir = D:\\VimTemp I have already created D:\VimTemp on my system. Now whenever I try to save changes to my file using :w I get the following error message "PenProperties.py" E510: Can't make backup file (add ! to override) I have

Vim error E510: Can't make backup file (add ! to override)

允我心安 提交于 2019-12-21 03:32:05
问题 I am using Vim on Windows and decided to create a separate directory for all my backup files created by vim. I am using Vim from my command prompt and not using the vim GUI(gVim). I looked at this post and added the following lines in my _vimrc set backup set backupdir = D:\\VimTemp I have already created D:\VimTemp on my system. Now whenever I try to save changes to my file using :w I get the following error message "PenProperties.py" E510: Can't make backup file (add ! to override) I have

Reasons for using command line Vim versus GUI Vim [closed]

北城余情 提交于 2019-12-21 03:29:07
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Background I'm building an application where it detects what documents you're using from the file system. To do this it must access

Keyboard-only column block selection in GVim Win32, or why does Ctrl-Q not emulate Ctrl-V when mswin.vim is included?

痴心易碎 提交于 2019-12-21 03:18:43
问题 I want to be able to select columnar blocks using only the keyboard when I use GVim on Windows, but I do not seem to be able to do so when using gvim (7.2) on Windows XP. Edit: For convenience, it is preferable to make the selection with arrow keys as is commonly done in other versions of vi/vim. In a terminal, when using vim, to define a block, one may select columnar blocks by pressing Ctrl-V and by conveniently moving the cursor with the arrow keys . When using GVim on mswin, Ctrl-V is

Diff of current and previous version using vim-fugitive

喜你入骨 提交于 2019-12-21 03:17:17
问题 I know that :Glog will populate the quickfix list with all the versions of the file in the current buffer and that I can hit <enter> on these to see the file at that particular version, but is there an easy way to see the diff of a particular version with the previous version (to easily see what has changed)? EDIT: What I'm after is seeing each of these changes in a vertical diff in vim: git log -p -- path/to/file.txt . 回答1: This is what I use: :Gdiff [revision] See :help Gdiff for other