Giter VIP home page Giter VIP logo

monodevelop-justenoughvi's Introduction

Just Enough Vi for MonoDevelop 6.0

Simplified Vi mode for MonoDevelop/Xamarin Studio. It's not supposed to completely emulate Vi/Vim but be just enough for navigating.

Join the chat at https://gitter.im/hifi/monodevelop-justenoughvi

Current Features

  • Intuitive and predictable normal mode navigation
  • Full line visual select with yank/delete/indent
  • Pass-through insert mode for full IDE potential

Out of scope

  • : ex mode

Status

There's a lot of bugs in cursor placement (compared to Vi/Vim) when handling some commands. Some are not a big issue but some are annoying enough and should be fixed.

Building

  • MonoDevelop development assemblies
  • Add-in Maker (available in add-in catalogue)

monodevelop-justenoughvi's People

Contributors

fadookie avatar gitter-badger avatar hifi avatar marrony avatar nosami avatar sim31 avatar tdfacer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

monodevelop-justenoughvi's Issues

v and ^v

only V works right now. Normal selection and block selection would be awesome.

Add-in maker can't be updated

There's a problem updating add-in maker dependency past 0.3.1 as there's a change in 0.3.2 how internal MD dependencies are handled.

Depends on mhutch/MonoDevelop.AddinMaker#35 to be resolved somehow or a manual dependency be added to this project in a way it builds locally and on addins.monodevelop.com.

O on line 2

......inserts a new row on the top line instead of the 2nd

gg

To move to first char on first line

Arrow keys for navigation

Please enable arrow keys for navigation in normal and visual modes as an alternative to hjkl. Thanks!

^D/^U

Should move half a screen up / down. If this is too tricky, page up or page down would be ok.

C commands

The ones I use most are C, cc, c$, ciw, caw, cw

gd

Should go to declaration

^d doesn't work

Currently ^d does not go page up but deletes a character.

gg should go to the first line of file

Could you implement gg to go to the first line of file instead of the last line (currently the same behavior as G)? This will make gg work the same way as Vim.

BTW, thank you very much for this excellent plugin. When I have to use Xamarin Studio 6 that is shipped without vi feature, this plugin saves me from adapting arrow keys for file navigation, which I've never done for years.

Also, I try to fork and help implementing this requested feature, but it seems that I need a linux box to do that, which I don't have now. ๐Ÿ˜ฉ

Thawatchai

Does it support XS 6.0?

The old VI option is removed from XS 6.0. Does this support 6.0? Is it also available in the addin site?

D

To delete until the end of the line

Some tests failing

I was trying to get the test suite running so I could add test coverage for my new commands.

However I got the following failures:

was:
{}
expected:
{

}
was:
{}
expected:
{
    }
was:
NavigationTests
expected:
ReplacingnTests
was:
{}

expected:
{
}

was:
{}

expected:
{
}

was:
aaaaaa
                  eeeeee
expected:
aaaaaa
                  dddddd
                  eeeeee
was:
aaaaa

                           bbbbb
                           ccccc
expected:
aaaaa

                           bbbbb
                           ccccc
Tests run: 105, Passed: 98, Errors: 0, Failures: 7, Inconclusive: 0
  Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
Elapsed time: 00:00:00.4050000

Errors and Failures:

1) Change_tests("{\n\tint a$;\n\tint b;\n}","ci{","{\n\t$\n}") (JustEnoughViTests.ChangeTests.Change_tests("{\n\tint a$;\n\tint b;\n}","ci{","{\n\t$\n}"))
     Expected string length 5 but was 2. Strings differ at index 1.
  Expected: "{\n\t\n}"
  But was:  "{}"
  ------------^

  at JustEnoughViTests.TextEditorTestBase.Check (JustEnoughVi.JustEnoughVi plugin, System.String content, System.Type expectedMode) [0x00065] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/TextEditorTestBase.cs:110 
  at JustEnoughViTests.TextEditorTestBase.Test (System.String source, System.String keys, System.String expected, System.Type expectedMode) [0x00030] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/TextEditorTestBase.cs:21 
  at JustEnoughViTests.ChangeTests.Change_tests (System.String source, System.String keys, System.String expected) [0x0000f] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/ChangeTests.cs:57 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /private/tmp/source-mono-4.4.0-c7sr0/bockbuild-mono-4.4.0-branch-c7sr0/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:295 


2) Change_tests("{ aksljd$f\n\t\taskldjf\n\t}","ci{","{$\n\t}") (JustEnoughViTests.ChangeTests.Change_tests("{ aksljd$f\n\t\taskldjf\n\t}","ci{","{$\n\t}"))
     Expected string length 4 but was 2. Strings differ at index 1.
  Expected: "{\n\t}"
  But was:  "{}"
  ------------^

  at JustEnoughViTests.TextEditorTestBase.Check (JustEnoughVi.JustEnoughVi plugin, System.String content, System.Type expectedMode) [0x00065] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/TextEditorTestBase.cs:110 
  at JustEnoughViTests.TextEditorTestBase.Test (System.String source, System.String keys, System.String expected, System.Type expectedMode) [0x00030] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/TextEditorTestBase.cs:21 
  at JustEnoughViTests.ChangeTests.Change_tests (System.String source, System.String keys, System.String expected) [0x0000f] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/ChangeTests.cs:57 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /private/tmp/source-mono-4.4.0-c7sr0/bockbuild-mono-4.4.0-branch-c7sr0/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:295 


3) ReplaceModeTests("N$avigationTests","Rreplacing","Replacingn$Tests") (JustEnoughViTests.ChangeTests.ReplaceModeTests("N$avigationTests","Rreplacing","Replacingn$Tests"))
     String lengths are both 15. Strings differ at index 0.
  Expected: "ReplacingnTests"
  But was:  "NavigationTests"
  -----------^

  at JustEnoughViTests.TextEditorTestBase.Check (JustEnoughVi.JustEnoughVi plugin, System.String content, System.Type expectedMode) [0x00065] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/TextEditorTestBase.cs:110 
  at JustEnoughViTests.TextEditorTestBase.Test (System.String source, System.String keys, System.String expected, System.Type expectedMode) [0x00030] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/TextEditorTestBase.cs:21 
  at JustEnoughViTests.ChangeTests.ReplaceModeTests (System.String source, System.String keys, System.String expected) [0x0000f] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/ChangeTests.cs:125 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /private/tmp/source-mono-4.4.0-c7sr0/bockbuild-mono-4.4.0-branch-c7sr0/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:295 


4) D_tests("{\n\tint$ a;\n\tint b;\n}\n","di{","{\n}$\n") (JustEnoughViTests.DeleteTests.D_tests("{\n\tint$ a;\n\tint b;\n}\n","di{","{\n}$\n"))
     Expected string length 4 but was 3. Strings differ at index 1.
  Expected: "{\n}\n"
  But was:  "{}\n"
  ------------^

  at JustEnoughViTests.TextEditorTestBase.Check (JustEnoughVi.JustEnoughVi plugin, System.String content, System.Type expectedMode) [0x00065] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/TextEditorTestBase.cs:110 
  at JustEnoughViTests.TextEditorTestBase.Test (System.String source, System.String keys, System.String expected, System.Type expectedMode) [0x00030] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/TextEditorTestBase.cs:21 
  at JustEnoughViTests.DeleteTests.D_tests (System.String source, System.String keys, System.String expected) [0x0000f] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/DeleteTests.cs:60 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /private/tmp/source-mono-4.4.0-c7sr0/bockbuild-mono-4.4.0-branch-c7sr0/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:295 


5) D_tests("{\n\tif$ (true)\n\t{\n\t\ta();{int a}\n\t}\n}\n","di{","{\n}$\n") (JustEnoughViTests.DeleteTests.D_tests("{\n\tif$ (true)\n\t{\n\t\ta();{int a}\n\t}\n}\n","di{","{\n}$\n"))
     Expected string length 4 but was 3. Strings differ at index 1.
  Expected: "{\n}\n"
  But was:  "{}\n"
  ------------^

  at JustEnoughViTests.TextEditorTestBase.Check (JustEnoughVi.JustEnoughVi plugin, System.String content, System.Type expectedMode) [0x00065] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/TextEditorTestBase.cs:110 
  at JustEnoughViTests.TextEditorTestBase.Test (System.String source, System.String keys, System.String expected, System.Type expectedMode) [0x00030] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/TextEditorTestBase.cs:21 
  at JustEnoughViTests.DeleteTests.D_tests (System.String source, System.String keys, System.String expected) [0x0000f] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/DeleteTests.cs:60 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /private/tmp/source-mono-4.4.0-c7sr0/bockbuild-mono-4.4.0-branch-c7sr0/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:295 


6) Should_delete_two_end_of_line (JustEnoughViTests.DeleteTests.Should_delete_two_end_of_line)
     Expected string length 56 but was 31. Strings differ at index 25.
  Expected: "aaaaaa\n                  dddddd\n                  eeeeee"
  But was:  "aaaaaa\n                  eeeeee"
  -------------------------------------^

  at JustEnoughViTests.TextEditorTestBase.Check (JustEnoughVi.JustEnoughVi plugin, System.String content, System.Type expectedMode) [0x00065] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/TextEditorTestBase.cs:110 
  at JustEnoughViTests.TextEditorTestBase.Test (System.String source, System.String keys, System.String expected, System.Type expectedMode) [0x00030] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/TextEditorTestBase.cs:21 
  at JustEnoughViTests.DeleteTests.Should_delete_two_end_of_line () [0x0001f] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/DeleteTests.cs:24 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /private/tmp/source-mono-4.4.0-c7sr0/bockbuild-mono-4.4.0-branch-c7sr0/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:295 


7) Should_insert_new_line_above (JustEnoughViTests.InsertTests.Should_insert_new_line_above)
     Expected string length 88 but was 72. Strings differ at index 6.
  Expected: "aaaaa\n                \n                           bbbbb\n     ..."
  But was:  "aaaaa\n\n                           bbbbb\n                     ..."
  ------------------^

  at JustEnoughViTests.TextEditorTestBase.Check (JustEnoughVi.JustEnoughVi plugin, System.String content, System.Type expectedMode) [0x00065] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/TextEditorTestBase.cs:110 
  at JustEnoughViTests.TextEditorTestBase.Test (System.String source, System.String keys, System.String expected, System.Type expectedMode) [0x00030] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/TextEditorTestBase.cs:21 
  at JustEnoughViTests.InsertTests.Should_insert_new_line_above () [0x0001f] in /Users/eliot/Dev/xamarin/monodevelop-justenoughvi/JustEnoughViTests/InsertTests.cs:31 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /private/tmp/source-mono-4.4.0-c7sr0/bockbuild-mono-4.4.0-branch-c7sr0/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:295 

Caret position affects visual line selection

When selecting whole lines and the caret is somewhere in the middle of some line the selection isn't always a complete line but only a portion of it. Moving the (invisible) caret with h or l usually fixes this but it's annoying.

^ and _

To move to the first non-whitespace char. Can also be used in motions

J makes Xamarin Studio (OS X) freeze

When I use J (Shift+J), Xamarin Studio freezes and I eventually have to force close. Being a Vim user, pressing this is a habit and I keep making it freeze. Not sure if it's this add-in's fault or if J is even implemented, but I thought it was appropriate to post it here.

Will this project support MonoDevelop 7.0?

As we know, the Visual Studio for Mac is launched. But for now I can't find any Vim extension for this new IDE. What only I can find after I search on Google is this plugin. I've tried install this manually, but seems it only supports MonoDevelop 6.0. I really hope that it will support MonoDevelop 7.0 and then I can use Vim on the new Visual Studio for Mac. Thanks mate~

Visual line deletion

Selecting multiple lines with V and then running d results in a blank line where there should be none.

Refactor all commands

The commands are becoming quite bloated inside one file so moving all commands to their respective files would be ideal.

Structuring the project source tree should be discussed what would make the most sense as there will be a lot of *Command.cs files if all commands are cut out. Some commands are shared between modes but most are mode specific.

All fitting change commands should use the new refactored format that was introduced in #28.

=

To correct the current indentation of the selection or the current line

e

like w but word end.

Switch focus to column/window with Ctrl+W

Feature request

In Vim you can switch to a different window by using Ctrl+W and the direction key the window is located in with respect to the currently focused one. Ctrl+W H and Ctrl+W L would be an amazing productivity boost, as little change as it seems to be.

b

Back word

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.