Skip to content

Commit

Permalink
Add gu and gb commands for goto usages and goto base symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
nosami committed Apr 15, 2018
1 parent f2e9b52 commit 6cdc6df
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# XSVim [![Gitter](https://badges.gitter.im/XSVim/Lobby.svg)](https://gitter.im/XSVim/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/nosami/XSVim.svg?branch=7.0)](https://travis-ci.org/nosami/XSVim)
# XSVim [![Gitter](https://badges.gitter.im/XSVim/Lobby.svg)](https://gitter.im/XSVim/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/nosami/XSVim.svg?branch=7.4)](https://travis-ci.org/nosami/XSVim)


# Installation
Expand All @@ -9,7 +9,26 @@ Interact with Visual Studio for Mac as follows:
Visual Studio -> Extensions -> Gallery -> IDE Extensions -> "VIM" -> Install
```

Then close the current document that you are working on and open a new document to activate the plugin. If that doesn't work, restart Visual Studio
Then close the current document that you are working on and open a new document to activate the plugin.

# What works?

Most Vim commands should work. If you see something that doesn't work, please file an issue. There's a good chance that I just don't know about it.

# What doesn't work

- Vim split windows. XSVim uses VS for Mac's side by side mode to emulate this, but it's only possible to have 2 vertical split windows. `<C-w>s` and `<-w>v` both switch to side by side mode.
- Visual block mode works for most tasks, but there are some differences in the way that VS handles virtual spacing at the end of lines.
- Selecting text with the mouse or using cmd+arrow keys doesn't switch to Visual mode
- `.` for repeat breaks when the commands to be repeated contain intellisense insertions.
- No leader key support or configurable key bindings.

# Extras

- `gd` - Goto declaration
- `gu` - Find usages
- `gb` - Go to base symbol
- `hjkl` support on the Solution Explorer pad and Test Explorer pad. Pressing `<esc>` on these will switch focus back to the last editor window. This feature does not yet work on the Search Results pad.

# Looking for the latest release?

Expand All @@ -21,3 +40,7 @@ Jump in our [Gitter channel](https://gitter.im/XSVim/Lobby) and introduce yourse

# With thanks to

- @shirshov
- @mdizzy
- @tdfacer

4 changes: 0 additions & 4 deletions XSVim.Tests/packages.config

This file was deleted.

2 changes: 1 addition & 1 deletion XSVim/Properties/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ open System.Runtime.CompilerServices
[<AutoOpen>]
module AddinVersion =
[<Literal>]
let version = "0.52.1"
let version = "0.53.0"

[<assembly: AssemblyTitle("XSVim")>]
[<assembly: AssemblyDescription("")>]
Expand Down
2 changes: 2 additions & 0 deletions XSVim/XSVim.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1538,6 +1538,8 @@ module Vim =
let lineNumber = match numericArgument with Some n -> n | None -> 1
[ runOnce Move (Jump (StartOfLineNumber lineNumber)) ]
| NotInsertMode, [ "g"; "d" ] -> [ dispatch "MonoDevelop.Refactoring.RefactoryCommands.GotoDeclaration" ]
| NotInsertMode, [ "g"; "u" ] -> [ dispatch "MonoDevelop.Refactoring.RefactoryCommands.FindReferences" ]
| NotInsertMode, [ "g"; "b" ] -> [ dispatch "MonoDevelop.RefactoryCommands.NavigationCommands.FindBaseSymbols" ]
| NotInsertMode, [ "g"; "t" ] -> [ func Window.nextTab ]
| NotInsertMode, [ "g"; "T" ] -> [ func Window.previousTab ]
| NotInsertMode, [ "z"; "z" ] -> [ dispatch TextEditorCommands.RecenterEditor ]
Expand Down

0 comments on commit 6cdc6df

Please sign in to comment.