Tags » VIM

Vim later, Vim earlier

Today I will tell about a very interesting feature of vim. It allows you to jump back in time and change a file to what it looked like at a particular time. 55 more words

Commands

Vim sessions

Usually I have many files open in a single tab and multiple tabs open in vim. But if I want to shut down the system and then resume the work, it’s really irritating to open all tabs and files again. 154 more words

Vim

Look ma, no mouse!

I have a challenge for myself. For the next week I am going to try to use the mouse and arrow keys as little as possible. 243 more words

vim : show ascii of the text

when i generate a diff today, i saw i have done some white space changes in the code. it is hard to just look at the text file and understand where exactly the space is added. 39 more words

Vim

在Trace32中调用GVIM

问题1 : 在Trace32的脚本中调用GVIM打开一个文件时,GVIM只在任务栏闪烁,却不变成活动窗口。需要鼠标再点击一次任务栏。

此问题的原因是Windows的窗口focus机制,Windows 7里默认任何程序都不能Steal Focus,也就是除了你用Alt-tab或鼠标点击任务栏来切换活动窗口,后台程序不能自主跳到前台变成活动窗口。改动的方法是修改注册表

HKCU\Control Panel\Desktop\ForegroundLockTimeout

这个值是当前活动窗口锁定focus的时间,单位是ms。默认值是一个比较大的值,也即很长时间都不允许其他程序Steal Focus。将这个值改成3000,则3s后其他程序可以Steal Focus。重启后生效。

问题2: 希望调用GVIM打开文件后,自动执行一个VIM的命令。而不需要手动再敲一次。

解决方案是在一个Server中打开某个文件后,向这个server发command。Trace32脚本如下

os.command "myvim "c:\users\r64998\desktop\dumparea.txt""
wait.500ms
os.command "gvim --servername misc --remote-send ":call FormatT32Memdump()<CR>""
15 more words

General Script

VIM syntax coloring in OSX Mavericks

~.vimrc

filetype plugin indent on
set term=builtin_ansi
syntax on
Hands On Guide

[Linux] VIM及系統共用剪貼簿

參考了好多資料,弄了一個下午,終於學會了,順便也學會了更多的相關指令:D

VIM v.s. System Clipboard

導因於我想在cluster上開兩個vim檔,有些東西想copy/paste去做測試,可是,選取好區塊要複製時,

卻發現我不能複製到同時已開啟的另一個檔案呀!(用screen開多個window)

因此,解決方式可能是:VIM和系統共用剪貼簿,就可以複製了!

REFERENCE

一切都是從這篇開始看

http://littleq.logdown.com/posts/2013/10/06/how-to-share-the-system-clipboard-in-vim-vim-copycat-profile

1. 我沒有root權限,無法重新編譯vim使得能啟用xterm_clip。

2. 我沒有root權限,所以發現很多module都會裝到起肖 = =

解法

一切從這篇的解法改進,由於我必須一切裝到我的$HOME,步驟當然跟他不一樣,沒有root權限可以參考使用。 192 more words

Python