Tag Archives: Vim

Aubrey’s gVim 0.2

Aubrey's gVim 0.2

Since releasing my gVim 0.1, I’ve made many improvements. Aubrey’s gVim is my own gVim with my own configurations to make Vim/gVim a good HTML, CSS, PHP & JavaScript editor for Windows. When you download my gVim, you are actually downloading what I use.

These features were kept from 0.1

  • Common editor functionality that allows Vim to behave like other code editors
  • Code Indentation Modifications that forces Vim to simply follow your current indentation
  • Tabs are always proffered over spaces
  • Tab width of 4
  • Zen Coding
  • Surround blocks of code with tags using Surround
  • Autoclose HTML Tags
  • Autocomplete "'{[(, etc
  • Pathogen for Plugins
  • Consolas font
  • Visual Tabs and line endings
  • Code folding disabled by default
  • Edit PHP files with embedded HTML, CSS and JavaScript code with highlighting
  • Jellybean Color Theme
  • Insert mode at start, use <ESC> to enter command mode.
  • Arrow keys work as hjkl
  • No swap or backup files when editing
  • Shifting blocks of code using <Tab> and <Shift>+<Tab>
  • Designed to fill a 1366 X 768 screen on startup
  • Start NERDTree using <Alt>+<N>
  • Snippets using snipMate

These features are new in 0.2

[adsense metakey=”ad1″]
  • .txt file treatment modifications
  • Enable wrapping using <Alt>+] and disable wrapping using <Alt>+[
  • Green cursor when in insert mode, red for command mode
  • Switches to current directory of opened file
  • Use right scroll bars only, left scroll bars disabled
  • Horizontal scroll bar enabled (because wrap is now off by default)
  • Visual mode preferred over select mode in all cases
  • Menubar invisible by default, use <Alt>+M to show and <Alt>+m to hide
  • Better CSS syntax highlighting
  • ColorV color picker/Preview for CSS w/ key configurations
  • Better syntax for HTML5 elements
  • !<Tab> snippet inserts !important for CSS
  • 80 character wrap for note taking

For details on how all these work, see the _vimrc file.

Download

My gVim is based on an installation of Vim, from vim.org with modifications.

Installation File (Windows Only)

I have bundled up my C:\Program Files\Vim into an install-able application that will copy my Vim installation to your machine in C:\Program Files\aubreysgvim. The only nag will be a initial message stating that Vim is not registered, just click “Yes” and it’s on it’s way!

This project is now hosted on: Google Code

Source

I have included the contents of my installation for those who do not wish to install it, but would like to view the customization. Linux and Mac users can use this file to pull vimfiles/.vim and _vimrc/.vimrc configuration.

This project’s source is also hosted on: Google Code

Aubrey’s gVim 0.1, Vim/gVim for editing/coding HTML, CSS, PHP & Javascript

Note: A newer version of Aubrey’s gVim is available.

This project arises out of my desire to make gVim/Vim work for me as an HTML, PHP, CSS & Javascript developer. As I continue to make it better and better, for me, I am going to release editions of my gVim/Vim as an install-able application for Windows called Aubrey’s gVim. I’m being the change I’d like to see in the world, and I was looking for a Vim that acted more like my Vim.

My goal is to make gVim/Vim act as comfortably as possible as an HTML, PHP, CSS and Javascript editor. Previous editors I have used were Notepad++, Komodo Edit, Textmate, and Sublime Text. I have customized Vim to be a replacement for them and I have also customized Vim to function like them, in terms of common editor usage. This means my gVim/Vim is not your typical Vim configuration. It has been configured to work more like the previous editors I had used before while obtaining the strengths of Vim.

Features and Configurations

  • Code Indentation using preserveindent, copyindentfiletype indent off
  • Tabs over Spaces
  • Tab width of 4
  • Zen Coding
  • Surround blocks of code with text
  • Autoclose HTML Tags
  • Autocomplete "'{[(, etc
  • Pathogen for Plugins
  • Select Mode <Shift>+<Up|Down|Left|Right> selects in Visual Mode
  • Consolas font
  • Visual Tabs
  • Folds Disabled
  • Edit PHP files with embedded HTML, CSS and JavaScript code and highlighting
  • Jellybean Color Theme
  • Insert mode at start, use <ESC> to enter command mode.
  • Arrow keys preferred over hjkl
  • No swap or backup files created
  • Shifting blocks of code using <Tab> and <Shift>+<Tab>
  • Designed to fill a 1366 X 768 screen on startup
  • Start NERDTree using <Alt>-<N>
  • Snippets using snipMate (activated using <Tab>)

Download

Currently Aubrey’s (my) gVim/Vim works only on Windows (the platform I am currently using Vim on).

aubreysgvim-0.01.exe [Installation File]

Installation

[iframe src=”http://www.youtube.com/embed/_yFdwBIMo8E” width=”100%” height=”340″]

I have no clue how the installation will act on your system, though I have tested the install on virtual machines on different platforms, and it has worked well. The only hitch is that you will get a warning when you first launch Aubrey’s gVim asking you to register it with your systems registry. You can see how the installation works in this video.

Use set selectmode= to disable select mode in Vim

Today I was using Vim and noticed that, while in insert mode, using <Shift-up|down|left|right> would cause Vim to go into select mode. Then, when I did a <Ctrl-c> to copy, <Ctrl-p> would not paste (I guess Windows key copy and paste do not work in select mode?).

Anyways, I was able to fix this problem by disabling selectmode all-together using:

set selectmode=

In the documentation it only gives key, cmd, and mouse and it took me awhile to figure out if you set it to nothing (NONE did not work) it will not enter select mode on either of these events.

This (and many other new things) will be present in 0.0.2 version of Aubrey’s gVim.

–servername FTP

A quick tip for using Aubrey’s gVim (my gVim), or regular gVim, with WinSCP or other FTP applications that use editors. I use the following syntax to open the first file in a gVim instance called FTP, then every file after that will also open in the same window (called FTP) as tabs (sorry, vertical splits don’t work).

"C:Program FilesVimvim73gvim.exe" --servername FTP --remote-tab-silent