Skip to content

greduan/vim-empty-insert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-empty-insert

An idea spawned by this HackerNews comment. The idea is basically that when a buffer is empty enter insert mode automatically, if it isn't empty then nothing happens, you're still in Normal mode.

It is important to note that it only works on buffers that have a physical location linked to them as well. In other words, only works on buffers that are associated with a file in the file system.

I realize that this is probably a better solution to this problem: https://github.com/kana/vim-skeleton

Unless you're a cool DIY person (like myself).

Installation

Use your favorite plugin manager.

I prefer vim-plug:

  1. Add Plug 'Greduan/vim-empty-insert' to your .vimrc file.
  2. Run :PlugInstall

Usage

This particular Vim plugin you can just install and it'll do its magic. :)

License

Copyright (c) 2014, Greduan <eduan@websharks-inc.com>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Author(s) and contributors

Check the CONTRIBUTORS file for contributors to this project.

For instructions and/or guidelines on contributing check the CONTRIBUTING.md file.

About

If (buffer == empty) enter insert

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published