Yet Another VIMRC
_ _ _ _ /\_/\ ___ | |_ __ _ _ __ ___ | |_ | |__ ___ _ __ /\ /\ (_) _ __ ___ _ __ ___ \_ _/ / _ \| __| / _` || `_ \ / _ \ | __|| `_ \ / _ \| `__| \ \ / / | || `_ ` _ \ | `__| / __| / \ | __/| |_ | (_| || | | || (_) || |_ | | | || __/| | \ V / | || | | | | || | | (__ \_/ \___| \__| \__,_||_| |_| \___/ \__||_| |_| \___||_| \_/ |_||_| |_| |_||_| \___| this time by malev
curl https://raw.github.com/malev/yav/master/tool/install.sh | sh
In order to use this Vimrc file you will need ctags and Ack. To install them on Ubuntu just run:
sudo apt-get install exuberant-ctags sudo apt-get install ack-grep
- ColorScheme: If the terminal has full color support it will use solarized, just because it's beatufil! If you don't have full color support then it will switch to , just because it's beatufil! If you don't have full color support then it will switch to wombat.
- Custom functions: It has some customs functions, for instance it will jump to the last cursor position if the file has already been opened. You can toggle between normal and paste modes with F2.
Userful variables: As any normal Vim, the current filename is stored on
%, but here you can access to the current path with
Tabs navigations: You can create a new tab with
tt, move to the next tab with
tn, go back with
tpand move any tab to any position with
tmand the position you want.
Windows: As always you can create new panels with:
:vsplit, or the short ways:
:vp. But to surf arround the panels you can use the shortkeys:
Ctrl + h,
Ctrl + kand
Ctrl + l. Which is much faster than the traditional
Ctrl + wcommand.
- Save as sudo with:
- Common typos support: WQ, Wq, W and Q work as they lower case friends.
- Switch between the last 2 files on the buffer:
<F3>To opens the file browser.
oopens the file,
topens in a new tab,
sopens in a vertical split,
iopens in a horizontal split. If you type
gbefore any instruction, you will have preview mode.
Ctrl + cto comment selected lines.
Ctrl + xto uncomment selected lines.
<F4>toggles Tag Bar.
,eopens the finder.
<C p>Paste previous yank,
<C n>Paste next yank.
:YRShowshow yanked history.
to be continue
New to Vim?
If you are new to vim there are a lot of places where you can start learning about this great tool. You should start watching this video, you can also read this by Drew Neil or, finally you could watch this screencasts serie by Dan Benjamin. Anyway, there is really a lot of vim stuff around the web. My recommendation is that you start with baby steps.
You can find them here.
- Add custom config file.
The MIT License (MIT)
Copyright (c) 2013 Marcos Vanetta, aka malev
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.