aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml14
-rw-r--r--README.md17
-rw-r--r--autoload/novim_mode.vim1
-rw-r--r--plugin/novim_mode.vim6
-rw-r--r--spec/spec_helper.rb6
5 files changed, 25 insertions, 19 deletions
diff --git a/.travis.yml b/.travis.yml
index 3f57f38..b74d59e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,13 @@
-addons:
- apt:
- packages:
- - vim-gtk
+language: ruby
+
+rvm:
+ - 2.4.1
+
+before_install:
+ # The default Ubuntu vim-gtk doesn't seem to load the plugin :/
+ - sudo add-apt-repository ppa:laurent-boulard/vim -y
+ - sudo apt-get update -q
+ - sudo apt-get install vim-gtk -y
before_script:
- "export DISPLAY=:99.0"
diff --git a/README.md b/README.md
index 7083a00..55ec3fd 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# No Vim Keybindings Mode
+# No Vim Keybindings Mode [![Build Status](https://travis-ci.org/tombh/novim-mode.svg?branch=master)](https://travis-ci.org/tombh/novim-mode)
Some, indeed many, may say this is counter-productive or even sacrilegious. But Vim is a lot more than just a keybinding paradigm; firstly it has one of the richest plugin ecosystems of any editor, but also it is a --if not *the* most-- ubiquitous text editor that's been battle tested for over 25 years. There are more reasons to use it than merely its famous shortcut vocabulary.
@@ -18,18 +18,11 @@ Use your favourite plugin manager, eg, for vim-plug;
Most keybindings should work as you might expect from, say Atom or Sublime Text; `SHIFT+ARROW` to select and `CTRL+C/V` to copy/paste. But don't expect Vim to completely bend to your will, it is still useful to familiarise yourself with some of Vim's basic concepts. For instance you may on occasion find yourself stuck in a particular Vim mode, like when pasting text without 'Paste Mode' then inserted text can trigger random mappings. In such case `CTRL+Q` may not kill Vim and you'll need to find a way of getting to Normal Mode and typing `:q` then `<RETURN>`. Such is life with Vim, this plugin is highly unlikely to ever change that. (BTW conventional pasting is on by default, but to exit an errant 'Paste Mode' use `:set nopaste`.)
-If you are new to Vim, then perhaps the only remaining confusion after installing
-this plugin will be about where files go when you open new ones. This question
-will be answered by Vim's concept of 'buffers'. You may wish to install something
-like [vim-buftabline](https://github.com/ap/vim-buftabline) to give a familiar
-list of open files along the top of the editor.
+If you are new to Vim, then perhaps the only remaining confusion after installing this plugin will be about where files go when you open new ones. This question will be answered by Vim's concept of 'buffers'. You may wish to install something like [vim-buftabline](https://github.com/ap/vim-buftabline) to give a familiar list of open files along the top of the editor.
### Keybindings
-Many terminals default to intercepting `CTRL+S` to suspend output, if so you will
-need to disable this behaviour. Most terminals will also bind the `CTRL+Q` to undo
-the suspend, useful, but you will also need to unmap that, or change the mapping
-in this plugin for quitting Vim.
+Many terminals default to intercepting `CTRL+S` to suspend output, if so you will need to disable this behaviour. Most terminals will also bind the `CTRL+Q` to undo the suspend, useful, but you will also need to unmap that, or change the mapping in this plugin for quitting Vim.
`CTRL`-based shortcuts are paired with uppercase letters here because Vim
does not recognise the difference between cases when using `CTRL` combinations and
@@ -72,7 +65,7 @@ documenting in uppercase implies something of this distinction.
#### Other text manipulation tricks
* `CTRL+LEFT/RIGHT`: Move cursor per word (works in selection as well).
* `CTRL+ALT+k`: Delete current line.
- * `CTRL+ALT+k`: Duplicate current line.
+ * `CTRL+ALT+d`: Duplicate current line.
* `CTRL+UP/DOWN`: Move current line or selected text up/down.
### Interoperability
@@ -89,7 +82,7 @@ inoremap ... custom mapping ...
call novim_mode#StartNoVimMode()
```
-Shorcuts are also grouped roughly under the headings described above, so you may be able to disable
+Shortcuts are also grouped roughly under the headings described above, so you may be able to disable
one of the following:
```vim
let g:novim_mode_use_general_app_shortcuts = 1
diff --git a/autoload/novim_mode.vim b/autoload/novim_mode.vim
index f7408d3..0abe936 100644
--- a/autoload/novim_mode.vim
+++ b/autoload/novim_mode.vim
@@ -5,6 +5,7 @@ function! s:IsEditableBuffer()
\|| !&modifiable
\|| &readonly
\|| bufname('%') =~# 'NERD_tree_'
+ \|| bufname('%') =~# 'fugitiveblame'
return 0
else
return 1
diff --git a/plugin/novim_mode.vim b/plugin/novim_mode.vim
index fbfdb1b..d5601b1 100644
--- a/plugin/novim_mode.vim
+++ b/plugin/novim_mode.vim
@@ -1,3 +1,9 @@
+" novim_mode.vim - 'Conventional' editor keybindings plugin
+" Author: tombh
+" Version: 0.1
+"
+" ============================================================================
+
let s:save_cpo = &cpo
set cpo&vim
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index fa8e548..f49f5a3 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -2,8 +2,8 @@ require 'vimrunner'
require 'vimrunner/rspec'
Vimrunner::RSpec.configure do |config|
- # Use a single Vim instance for the test suite. Set to false to use an
- # instance per test (slower, but can be easier to manage).
+ # Set to false to use an instance per test (slower, but can be easier
+ # to manage).
config.reuse_server = false
# Decide how to start a Vim instance. In this block, an instance should be
@@ -11,7 +11,7 @@ Vimrunner::RSpec.configure do |config|
config.start_vim do
vim = Vimrunner.start
- # Setup your plugin in the Vim instance
+ # Load the plugin
plugin_path = File.expand_path('../..', __FILE__)
vim.add_plugin(plugin_path, 'plugin/novim_mode.vim')