跳至主要内容

博文

目前显示的是标签为“vim”的博文

Open current file's directory

I've nuked my working Emacs environment for some known reason. To get back some editing power, I set up a simple Vim environment. As a result, I've always missed the capability to open the current file's directory for exploring. To do it in Vim: use netrw's Explore command series. :Exp :Lex :Sex etc. Note, there's a fascinating abbreviation -- Sex-plore ;)

Junction as symbolic link on windows 7+

Why? It’s all about the vim on windows' thing. Gvim and vim-in-git The official vim for windows (namely Gvim), compiled for win32 system, looks for user vim packages from windows style directory `$HOME/vimfiles`. While the vim bundled with git for windows, which was compiled by mingw64, looks into a Unix style directory `$HOME/.vim` for the same thing. The diverse of user packages will not cause any trouble, if you don’t have any vim related customization for yourself like me does. Things get changed until recently VIM upgraded to 8.0. The new vim packages system The new vim comes with its own package management system namely vim packages. This package system makes it simple to install third-party vim plugins by just clone github plugin repo into the vimfiles directories. SOMENAME/pack/PACKAGENAME/start (for ftplugins) SOMENAME/pack/PACKAGENAME/opt (for colorscheme plugins) How to merge the two vimfiles Solution 1: Make use of multiple repo management software suc...

Manage local gits with repo

Would like to use repo because of Uh… Vim 8.0 There are at least two copy of VIMs lives in my laptop. One was manually installed gvim 8.1, the other is bundled vim by msysgit. As of vim 8.x there’s a new package management system released. One may manage all vim plugin package without any third part plugin manager. As described in this famous blog post. git submodule add https://github.com/vim-airline/vim-airline.git pack/shapeshed/start/vim-airline # git add .gitmodules pack/shapeshed/start/vim-airline Anyway, I have no confidence in the git submodule command. Also, the solution try to initial one git repo group for each dot vim. I don’t like to iterate over all dot vim directories one by one when doing plugin updates. Alternative way is to make use of git-repo tool to handle all the git repositories (vim plugins) as a whole… Repo init Error executing repo init… Because of msys path and win32 native path conflict. As my python interpreter comes with emacs, which is comp...

Why not use neovim in windows

Things I like neovim better The tab-complete options are shown as horizontal line just above the modeline, really cool. Yanking to windows clipboard seemlessly in the backgound, saves me a lot of mouse clicks. The :checkhealth command Things I don't like filenames for nvim-qt.exe wrapper must be sperated by ****double double dash**** with its own options… like this: c:\opt\neovim\nvim-qt.exe --maximized -- -- foobar.txt Things I can not live with The anonymous buffer is changed issue. I am not sure how to reproduce it, anyway it is really annoying to run into it. It prevent the process from exiting, neither :q! Nor windows close button works. I have to kill the nvim process in windows task manager, then kill the nvim-qt wrapper.