vim

Why does my nerd tree have these odd characters

纵饮孤独 提交于 2020-01-02 03:37:08
问题 Trying to get a nice vim setup going. I'd like to have nerd tree working at it's best, but when i use it it's got these chars in front of each section: ?~V? Looks like this: ?~V? project/$ ?~V? tools/$ 回答1: I had this exact same problem and was able to fix it by uncommenting UTF-8 and leaving ISO-8879-1 commented out in /etc/locale.gen. Then I ran locale-gen and restarted. Also added 'export LANG=en_US.UTF-8' to my .bashrc. Here are the results of my locale settings once it started working:

Show 'space' character via listchars only for leading spaces

早过忘川 提交于 2020-01-02 03:15:21
问题 Is it possible in Vim to have my editor (when editing .c and .h files), show via listchars , a special character only for leading space characters? I found a separate post that noted, as of version 7.4, Vim now supports highlighting all space characters via listchars . Here's my current listchars variable: set list listchars=tab:>-,trail:.,extends:>,precedes:<,space:. And here is a render of how it appears on my screen: However, I would like it to appear like so (below), where only leading

How to solve the collision of TAB key mapping of `UltiSnips` plugin in the Vim

风格不统一 提交于 2020-01-02 02:49:07
问题 I've set the mapping keys as follows: " Easy indent for code blocks nmap <tab> v> nmap <s-tab> v< vmap <tab> >gv vmap <s-tab> <gv That works good. But, when I installed UltiSnips by vundle, the Tab key does't work as indent action, it will remove multi-line codes which I selected. I know this is because the default setting of UltiSnips . I would like to remain the Tab mapping for UltiSnips to trigger its functions, How do I solve the problem of using the TAB key to indent code blocks? Thanks!

In Visual Studio Code, how to toggle between vim-emulation and no-vim-emulation when the vscodevim extension is installed?

人走茶凉 提交于 2020-01-02 02:46:08
问题 I haven't found a way to quickly do this without having to entirely disable the extension in the "Extensions" panel. In IntelliJ IDEA, one can easily toggle on/off the emulation with a configurable keyboard shortcut. I guess it should also be possible in VSCode. 回答1: VSCode has the same command system as atom. These commands can be started through the "command palette" and also bound to a key-combo. The corresponding command is toggleVim . You can bind this command to a key using the gear

Too many inotify events while editing in vim

谁说我不能喝 提交于 2020-01-02 02:32:06
问题 I'm trying to use inotifywait for monitoring specific folders and recompiling if needed. The problem is that I'm using vim heavily, and when I'm editing in vim any file modified actually triggers some 'redundant' events, something like: :w sass/somefolder/ CREATE 4913 sass/somefolder/ CREATE some sass/somefolder/ MODIFY some It took me some time to realize that actually everything is OK with inotifywait - I've tried to use nano and everything worked just as expected, only "MODIFY" is

Do developers actually use vim to write code (Java) on a Windows OS? [closed]

六眼飞鱼酱① 提交于 2020-01-02 02:23:06
问题 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 9 years ago . ...or is vi/vim only used when developing on a non-Windows OS? If not, what feature(s) does vim provide that modern IDEs such as

Taking a quick look at DiffOrig, then switching back

不羁岁月 提交于 2020-01-02 02:00:15
问题 I've discovered this great command from the documentation: command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis \ | wincmd p | diffthis So I've come up with this: command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis | wincmd p | diffthis | wincmd p map <Leader>do :DiffOrig<cr> map <leader>dc :q<cr>:diffoff!<cr> The problem is, when I se \dc , it will jump back to the beginning of the file, not where I left it prior to issuing \do . How to fix this? Please try this

Move to the end of line character in Vi, past the last character in the line

喜夏-厌秋 提交于 2020-01-02 01:54:09
问题 How come in Vi, when I hit $ , it goes to the last character in the line instead of the end of the line character? How would I go to the end of the line character in one keystroke, and what is the fastest way to delete the end of the line character? 回答1: How come in Vi, when I hit $ , it goes to the last character in the line instead of the end of the line character? Because that’s sufficient for anything you might want to achieve. How would I go to the end of the line character in one

Enabling italics in vim syntax highlighting for mac terminal

淺唱寂寞╮ 提交于 2020-01-02 01:35:11
问题 I'd like to have vim display my comments in italics, and I understand I need to place cterm=italic in the hi Comment line in the color.vim file I'm using. This, however, is having no effect on the text display, which I suspect has to do with some Terminal.app setting, unless I'm misunderstanding the vim syntax. I'd appreciate if someone can show me how to enable this feature. Additionally, I am currently using the Monaco font, which does not have a separate italic file (however, the italic

How to map arrow keys with an AutoHotKey script like Vim?

╄→尐↘猪︶ㄣ 提交于 2020-01-01 19:41:54
问题 Referring to question Windows 7 Map CTRL + j to the Down Arrow Key How can I map the arrow keys with AutoHotKey like vim? Ctrl+h = Move left Ctrl+j = Move down Ctrl+k = Move up Ctrl+l = Move right 回答1: Make an AutoHotKey-script like this: ^h:: Send, {Left down}{Left up} Return ^j:: Send, {Down down}{Down up} Return ^k:: Send, {Up down}{Up up} Return ^l:: Send, {Right down}{Right up} Return 来源: https://stackoverflow.com/questions/31425458/how-to-map-arrow-keys-with-an-autohotkey-script-like