Code Monkey home page Code Monkey logo

vspacecode's Introduction

VSpaceCode (Preview)

Docs Version Installs Ratings

VSpaceCode Logo

This extension is inspired by spacemacs and aiming to provide similar experience in VSCode. An action menu trigger by space key is implemented to reduce memorization of shortcuts. You can change the editor group, change the file language, and check git status without leaving your keyboard. This provides the speed to shortcut while minimizing typing comparing to fuzzy search in the command palette or shortcut memorizing.

Features

  • Spacemacs like action menu to reduce memorization of shortcuts
  • All menu items are customizable
  • The menu key is customizable
  • Bundle all the extensions needed out-of-the box

VSpaceCode actions

Project history

This project was initially started by StreakyCobra as a configuration file for VSCodeVim to be merged in your settings.json file. stevenguh developed on his side stevenguh/spacecode also with the goal to bring Spacemacs bindings to VSCode. After some discussion we agreed to merge the two projects to keep this niche community unified. stevenguh solution was technically better, but this project had a larger community and was better referenced, so it was decided move his extension here and to deprecate stevenguh/spacecode.

If you prefer this project's first approach using settings without an extension, see the vscode-vim branch.

Installation and documentation

You can find installation instructions and documentation in the VSpaceCode website.

Release Notes

See CHANGELOG.md

Contributing

All feature requests and help are welcome. Please check out our contributing guide on how you can help.

This project is maintained by different people around the world in their free time. Thank you for your contribution. ❤️

Related projects

  • Intellimacs - Spacemacs' like key bindings for IntelliJ platform
  • Spaceclipse - Spacemacs’ like key bindings for Eclipse
  • SpaceVim - A community-driven modular vim distribution

vspacecode's People

Contributors

adamfeldman avatar adriandole avatar adrianstaniec avatar danielo515 avatar danielpza avatar dependabot[bot] avatar emmanueltouzery avatar erichonorez avatar fabrik42 avatar g-ewing avatar hyunggyujang avatar jamrizzi avatar jbullers avatar jodli avatar joefiorini avatar joehillen avatar joelpet avatar lonelysteve avatar macintacos avatar marcoieni avatar mayanez avatar o8vm avatar ossoso avatar patrickwulfe avatar practicalli-johnny avatar siboehm avatar sleepyfran avatar stevenguh avatar streakycobra avatar the-compiler avatar

Stargazers

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

Watchers

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

vspacecode's Issues

Merge Easy Menu Navigation to settings.json

I am opening this issue to track the work that could be done to merge Easy Menu Navigation described in README to settings.json so when user choose to run the automatically configuration on fresh install or when they rerun the configuration commands again.

Make `SPC f t` close the explorer sidebar if it's visible

Quoting VSpaceCode/vscode-which-key/issues/5, Spacemacs SPC f t chord does the following:

  1. If the sidebar isn't open, open the sidebar and focus the explorer.
  2. If the sidebar is open but the explorer is not visible, open the explorer and focus it.
  3. If the sidebar is open and the explorer is visible, close it.

Currently, SPC f t does 1 and 2, but not 3. I just double-checked to make sure, and Spacemacs definitely does number 3, but VSpaceCode's implementation of it does not. This should be added to VSpaceCode.

Duplicate <spc> f l

<spc> f l are bound to two commands -- revealInOS and for changing file language. These commands are unique to VSCode, and need to figure out a way to put them

[Question] Toggling search highlighting

I tried to add this

{
    "key": "h",
    "name": "Toggle search highlighting",
    "type": "command",
    "command": "vim.remap",
    "args": {
        "commands": [
            ":nohl"
        ]
    }
}

to the package.json and built the extension, but when I pressed the key it showed an error. Is there a way to map a keybinding to hide the vim search highlighting?

Roadmap

This is an issue to track the work up to v0.5.0

🏃 - In Progress

v0.4.0

  • Basic transient menu
  • Argument passing in command calling which enables vim command/key calling
  • Change the bindings so it's more in line with spacemacs bindings (stevenguh/spacecode#8)
  • Add one time notification for when the extension is updated

v0.4.x

  • Any bug fixes
  • Missing key bindings update

v0.5.0

  • Break off the core menu structure to vscode-which-code (@stevenguh)
  • Drop support for non-Vim users and redirect them to vscode-which-code
  • Support y menu in magit (@stevenguh)
  • Figure out the installation
  • Experiment with extension pack
  • Drop GitLens bindings in git menu in favor of edamagit
  • Add <spc> j and easymotion settings on install

Miscellaneous/Bug

  • Use webpack to reduce size
  • Choose a optimal ts transpiring target for the vscode version targeted
  • Fix the vim check when the extension is install in VSCode Remote
  • Create a contribution guide (#48)

Delay before showing menu

It would be awesome if the extension gave the option of adding a delay before the quick pick menu appeared (like in spacemacs). I realize this may be hard to implement since the extension currently relies on the quick pick to capture input, but thanks for considering it.

P.S. Many thanks for this extension. I recently switched from spacemacs to VS Code and this extension makes my VS Code experience so much better.

delete vim fork

Should we delete this repo?
I don't think it's used anymore.
Apparently I don't have the permissions to that.

Bind SPC s s to fuzzySearch to emulate Helm Swoop / Ivy Swiper

Providing a binding for some replacement to Helm-Swoop/Ivy-Swiper bound to SPCss would be really nice, Using the fuzzy-search extension I've put the following in my settings.json to emulate it:

 {
  "before": ["<leader>", "s", "s"],
  "commands": ["fuzzySearch.activeTextEditor"]
  },

Maybe this is something that could be included out of the box?

Extension Details

Name: fuzzy-search
Id: jacobdufault.fuzzy-search
Description: Fuzzy search
Version: 0.0.2
Publisher: jacobdufault
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=jacobdufault.fuzzy-search

Project's direction

The VSpaceCode project is young, and for now it only consists of people sharing their configurations manually.

While being a good starting point, this solution is far from ideal. So the idea is to gather around this project all the people wanting to participate in making VSCode works with Spacemacs' key bindings, and to find together the best solution to achieve this goal.

This issue is for discussing the project direction, to decide in which way the project should be oriented, like just as a shared configuration file or as a VSCode extension.


Solutions imagined so far:

  • Continue as it is now: A shared configuration that should be manually installed and updated.
    ✅ Done

  • Develop VSpaceCode as a settings builder, i.e. people clone this repository and customize it with their own settings files. VSpaceCode then provide a scripts that generated the full settings.json file that people can put in VSCode, which will contain both their setting and the VSpaceCode mappings.
    ✍️ In development

  • Create a VSCode extension to provide the VSpaceCode mappings.
    🚫 Not possible, see #1 (comment)

  • Build a custom extension upon VSCodeVim providing the Spacemacs-like experience out of the box.
    💬 In discussion

File Fuzzy Find

Is there a keybinding for CMD + P (on Mac) to launch the fuzzy finder?

Marker Previous Command Incorrect

The command to see the previous error is incorrectly called as:
"editor.action.marker.previous"

The correct command is:
"editor.action.marker.prev"

    {
        "before": [
            "<leader>",
            "e",
            "p"
        ],
        "after": [],
        "commands": [
            {
                "command": "editor.action.marker.prev",
                "args": []
            }
        ]
    }

editor command

Restore old features

As you may noticed this project was merged with spacecode and some key bindings and settings that existed only in this project are not in the master branch anymore.

The old approach of the repository (before the merge) is maintained in the vscode-vim branch.

The features that got lost in the process are the following:

  • keybindings.json: easy menu navigation.
  • settings.json contains the settigs "vim.useSystemClipboard": true and "vim.easymotion": true.
  • settings.json contains all the old key bindings, too. This is why I added the "good first issue" label. You should identify the key bindings of the settings.json file that got lost during the process and add them in this file which contains all the new key bindings. If two key bindings conflict, the most similar to the spacemacs behaviour should win. Try to add few key bindings (also one is ok) for each pull request.

If there is no way to "install" some parts of keybindings.json or settings.json with the plugin (i.e. set the key value pair as default when this plugin is installed), a new settings.json file that contains all these parts should be created and the README should explain that it requires to be manually merged in your own settings.json.
At the moment it is acceptable that some key bindings that cannot be integrated with the plugin are included only in the new settings.json file and therefore are not listed in the which-key window.

Jump to word with fuzzy search

First of all, congratulations on the latest update.

I really like helm swoop in spacemacs.
So I was pleasantly surprised by your implementation with fuzzy search (search in the current editor with <spc s s>).
Unfortunately, when I use it, the cursor is not positioned on the searched word but only at the beginning of the line containing the searched word.

Is there an option or other shortcut to access this feature?

<spc> s s and <spc> s S behavior

Hi there,

I am using version 0.7.1 of VSpaceCode. I tried this on Ubuntu 20.04 and OS X 10.15.6

I am unable to make these two commands work properly.

s s doesn't do anything
s S throws an error: TaskQueue: Error running task. Failed to handle key= . command 'fuzzySearch.activeTextEditorWithCurrentSelection' not found.

Thanks,

Collaboration with vscode-hydra

Continuation from #1 regarding collaborating with vscode-hydra.

@MarcoIeni @StreakyCobra

As far as I understand, we have different plugins aiming to solve the following problems.

  1. Extending shortcut length
    VSCode default shortcut length is 2 chars long and IMO is vastly underpowered for keyboard heavy users
  2. which-key sort of support
    Aid users with shortcut completion similar to emacs / vim
  3. Easy configuration of shortcuts
    VSCode has a lot of commands and the list is not maintained anywhere. Everyone many not be comfortable in digging deep to find the required command.

My proposal involves developing an intermediate interface which maps VSCode commands with semantic-named-commands with the following capabilities

  1. Should auto generate keybindings based on the naming convention of semantic-named-commands
  2. Should identify focus changing events and handle them appropriately
  3. Provide a semantic language for end-user configuration which maps to semantic-named-commands
  4. The usuals: command autocomplete, suggestions etc

Here is an example of default configuration.

  1. window.terminal.toggle -> executes vscodes toggle command -> should generate keybinding : wtt
  2. window.terminal.toggle:::true -> invoke terminal toggle command with argument as true -> should generate keybinding wttt or ask for configuration if conflict arises. ::: is the separator for argument
  3. Window.activity.toggle -> executes vscodes toggle activity bar command -> should generate keybinding Wat (notice uppercased W)

The above commands should create the interfaces below

  1. window
  • terminal
    • toggle
  1. Window (uppercase W)
  • activity
    • toggle

Assuming that the above commands are default and are provided by us, everyone may not be happy with them. Lets assume someone wants to group them under key a

User defined semantic language could be something like this. $ signifies user namespace.

  1. $application = window
    All commands and keybindings of window namespace is mapped to application namespace for key a
  2. $application.$terminal = window.terminal
    All commands and keybindings of window.terminal namespace are mapped to a.t namespace
  3. $project.$search = #editor.action.find
    Namespace p.s is mapped to vscode command editor.action.find
    .. and so on

Once the interface is developed, we can use it in our respective extension as a command provider.

Let me know your thoughts.

SPC s P does not work

When I type SPC s P I get the error:

TaskQueue: Error running task. Failed to handle key=P. command 'workbench.action.findInFilesWithSelectedText' not found.

Was the action workbench.action.findInFilesWithSelectedText removed?
I don't see it when I press SPC h d.

If the action has been removed we can delete SPC s P.

My (very custom) keybinding setup; just wanted to share

I spent a bunch of time adding a lot of new menus/commands to my default VSpaceCode setup, which I've put up in a gist here:

https://gist.github.com/macintacos/d63b7057cee0638e7ccfcdd6d1b7f662

Feel free to rip as much as you'd like.

I don't think that I necessarily want to contribute this directly to this repo, since there are a lot of opinionated menus/actions that I added that deviate from "traditional" Spacemacs. One big thing that I did (for example) is that I remove all references to magit; while I really like magit, I've gotten used to my workflow with Sublime Merge over the past year or so, and that's by far the most opinionated thing in there. There are also a lot of references to extension commands that naturally you'd have to have installed in order for them to work.

The biggest thing that made me realize that I could use VSpaceCode for everything was when I saw which-key and the fact that you could map <space> to invoke VSpaceCode directly (meaning that you could theoretically invoke it from anywhere, not just the editor), so now I can completely move away from Spacemacs to VSCode with really minimal compromises for my needs. Thanks a bunch; I'll probably deprecate Chord Heavy and just point them to this extension.

Horizontal window splits

With grid layouts now available in VS Code, it would be great if the bindings for generating window splits and navigating them were added. The ones I know about and use regularly are:

  • SPCw- for creating a horizontal split.
  • SPCwj for moving to the split below.
  • SPCwk for moving to the split above.

macOS command does not exist

key: [ "leader", "p", "l" ]
"command": "workbench.action.files.openFolder",

This command doesn't exist in MacOS.

Re-eval installation method

Currently, we have a vscode notification to guide use to install settings automatically; however, there are some cases that it currently needs to be worked on. For example: vscode remote. Also, there is no api for extension to add to user's keybindings.json, although there is a hack that could.

Moving forward, a question remains -- what if we cannot automate well on installation, should we switch to a fully manual installation like copy-and-paste?

There are a few options:

  1. Continue the current installation method of adding config automatically to user's settings.json when user click the button in the notification.
  2. Remove the continuous checking. Only check on a fresh install.
  3. Remove notification on fresh install, and only provide command to install. For example, the user will need to use Ctl+Shift+P to install.
  4. Completely manual

There's also a lot of moving parts that would change the consideration on this like dropping support of non-vim users, support y menu in magit (which will need to add bindings to user's keybindings.json)

My current thinking is that, the continuous checker will likely to be removed because when we add <spc> j we will requires user to enable easy motion; however, user might not want to enable that. So continuous checker can be an annoyance when the user turned some settings off. This is open to discussion.

New commands are not being added to VSpaceCode's which-key menu

Not sure if this is an issue with vscode-which-key, VSpaceCode, or just a misplaced character somewhere, but with no validation I'm finding it hard to figure out what's going on.

I've been adding a lot of keybindings to my settings to emulate more and more Spacemancs functionality. I have the following configuration in my settings.json right now:

"vspacecode.bindingOverrides": [
    {
      "bindings": [
        {
          "command": "multiCommand.copyRelativePathAndPrintIt",
          "key": "r",
          "name": "...relative path of current file (copies it too)",
          "type": "command"
        },
        {
          "command": "extension.relativePath",
          "key": "R",
          "name": "...relative path of other file in project",
          "type": "command"
        },
        {
          "command": "multiCommand.copyRelativePathAndSelectedLinesAndPrintIt",
          "key": "l",
          "name": "...relative path of current file AND selected line numbers (copies it too)",
          "type": "command"
        }
      ],
      "keys": ["i", "f"],
      "name": "Insert file...",
      "type": "bindings"
    },
    {
      "bindings": [
        {
          "command": "copyFilePath",
          "key": "y",
          "name": "...current file with absolute path",
          "type": "command"
        },
        {
          "command": "copy-relative-path-and-line-numbers.path-only",
          "key": "r",
          "name": "...current file with relative path",
          "type": "command"
        },
        {
          "command": "copy-relative-path-and-line-numbers.both",
          "key": "R",
          "name": "...current file with relative path and current line numbers",
          "type": "command"
        },
        {
          "command": "fileutils.copyFileName",
          "key": "n",
          "name": "...current file name with extension",
          "type": "command"
        }
      ],
      "keys": ["f", "y"],
      "name": "Copy...",
      "type": "bindings"
    },
    {
      "command": "git.checkout",
      "key": "g.B",
      "name": "Branch",
      "type": "command"
    },
    {
      "command": "outline.focus",
      "key": "f.O",
      "name": "Focus file outline view",
      "type": "command"
    },
    {
      "command": "workbench.action.closeUnmodifiedEditors",
      "keys": "b.D",
      "name": "Close unmodified editors",
      "type": "command"
    },
    {
      "command": "fileutils.removeFile",
      "keys": "f.D",
      "name": "Delete current file",
      "type": "command"
    },
    {
      "command": "fileutils.renameFile",
      "keys": "f.R",
      "name": "Rename file",
      "type": "command"
    },
    {
      "command": "workbench.action.output.toggleOutput",
      "keys": "e.o",
      "name": "Toggle output view",
      "type": "command"
    },
    {
      "bindings": [
        {
          "command": "bookmarks.toggle",
          "key": "m",
          "name": "Toggle bookmark",
          "type": "command"
        }
      ],
      "keys": "B",
      "name": "Bookmark Actions",
      "type": "bindings"
    },
    {
      "bindings": [
        {
          "command": "editor.action.commentLine",
          "key": "l",
          "name": "Comment/uncomment line(s)",
          "type": "command"
        },
        {
          "command": "code-runner.run",
          "key": "r",
          "name": "Run code in curent file",
          "type": "command"
        },
        {
          "command": "multiCommand.copyAndCommentLines",
          "key": "y",
          "name": "Copy selection and comment line",
          "type": "command"
        }
      ],
      "keys": "c",
      "name": "Comment Actions",
      "type": "bindings"
    },
    {
      "bindings": [
        {
          "command": "workbench.action.openGlobalSettings",
          "key": ",",
          "name": "Open global settings",
          "type": "command"
        },
        {
          "command": "workbench.action.selectIconTheme",
          "key": "i",
          "name": "Choose icon theme",
          "type": "command"
        },
        {
          "command": "workbench.action.openGlobalKeybindings",
          "key": "k",
          "name": "Open global keybindings",
          "type": "command"
        },
        {
          "command": "workbench.action.openGlobalKeybindingsFile",
          "key": "K",
          "name": "Open global keybindings JSON",
          "type": "command"
        },
        {
          "command": "workbench.action.configureLanguageBasedSettings",
          "key": "l",
          "name": "Open language settings",
          "type": "command"
        },
        {
          "command": "workbench.action.openSettings",
          "key": "n",
          "name": "Open User snippets",
          "type": "command"
        },
        {
          "command": "workbench.action.openSettingsJson",
          "key": "s",
          "name": "Open global settings JSON",
          "type": "command"
        },
        {
          "command": "workbench.action.selectTheme",
          "key": "t",
          "name": "Choose color theme",
          "type": "command"
        },
        {
          "command": "extension.updateSettings",
          "key": "u",
          "name": "Update/upload settings",
          "type": "command"
        },
        {
          "command": "workbench.action.openWorkspaceSettings",
          "key": "w",
          "name": "Open workspace settings",
          "type": "command"
        },
        {
          "command": "workbench.action.openWorkspaceSettingsFile",
          "key": "W",
          "name": "Open workspace settings JSON",
          "type": "command"
        }
      ],
      "keys": ",",
      "name": "Settings/Preferences",
      "type": "bindings"
    }
  ],

I'm continuing to add more. The JSON document itself is not throwing any errors, and most of the commands are showing up for me. However, the SPC g B keybinding that I added does show up (there are other examples, but that's the one where I first noticed that they weren't showing up in the menu). This error is showing up in my console:

console.ts:137 [Extension Host] TypeError: Cannot read property 'length' of undefined
    at /Users/juliant/.vscode/extensions/vspacecode.whichkey-0.7.4/dist/extension.js:1:2364
    at Array.forEach (<anonymous>)
    at Function.overrideItems (/Users/juliant/.vscode/extensions/vspacecode.whichkey-0.7.4/dist/extension.js:1:2261)
    at t.default.register (/Users/juliant/.vscode/extensions/vspacecode.whichkey-0.7.4/dist/extension.js:1:5613)
    at u (/Users/juliant/.vscode/extensions/vspacecode.whichkey-0.7.4/dist/extension.js:1:3574)
    at _executeContributedCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:631:163)
    at _doExecuteCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:630:348)
    at _.executeCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:630:254)
    at Object.executeCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:911:820)
    at /Users/juliant/.vscode/extensions/vspacecode.vspacecode-0.7.3/dist/extension.js:1:6336
    at t.activate (/Users/juliant/.vscode/extensions/vspacecode.vspacecode-0.7.3/dist/extension.js:1:6443)
    at Function._callActivateOptional (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:837:509)
    at Function._callActivate (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:837:160)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:835:703
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
    at async Promise.all (index 3)
    at async Promise.all (index 0)

It says it's which-key that's hitting the error, but I can't tell if it's VSpaceCode that is interpreting my settings incorrectly (which is thus being passed to which-key). Happy to move this issue over to that repo if this is an issue with which-key itself.

Please let me know if there's anything that I can do to help you get to the bottom of this. I'm going to continue to fiddle around with my settings to see if I can figure it out.

<spc> v doesn't trigger visual mode

After finishing a selection with <spc> v it doesn't automatically goes into visual mode. An additional v is needed once you escape the menu to toggle to visual mode.

<leader> f f broken?

I'm finding that if I press <leader> f f , nothing happens. More concerning, it also stops other bindings like <leader> <leader> from working correctly until I close that editor and open a new one.

Any idea why this might be happening? I'm not sure if it's a bug here or in VSCodeVim

Config notification doesn't show up on extension reinstallation

The README says:

After the installation of the extension, a notification will help you to configure both the necessary settings and user bindings.

I had an empty settings.json file and nothing appeared for me and key bindings do not work.
I tried to uninstall and reinstall several times, but the behavior is the same.

Restore <SPC> <TAB> to switch to previous editor

SPC <tab> works with the following settings.json:

{
    "vim.normalModeKeyBindingsNonRecursive": [
        {
            "before": [
                "<space>"
            ],
            "commands": [
                "vspacecode.space"
            ]
        },
        {
            "before": ["<leader>", "<tab>"],
            "commands": ["workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup"]
        },
    ],
    "vim.visualModeKeyBindingsNonRecursive": [
        {
            "before": [
                "<space>"
            ],
            "commands": [
                "vspacecode.space"
            ]
        }
    ],
}

Of course it is an hack and this key bindings will not be listed in which key.

What do you think? In my opinion this key binding is really useful, so maybe this hack may be worth it.
We could specify that this key binding is not showed in which key in the file that we discussed in #47

This issue is related to #52

Configure delay between typing the command and the menu showing up

In spacemacs, the minibuffer with command hints shows up with a delay.

This has the benefit that if you have the command memorized, you don't need a janky ui part momentarily appearing then disappearing.

Example scenario: I don't want the menu to show up every time I'm switching between open panes using SPC w h and SPC w l

Activate menu in sidebar and panel

Split from #80 (comment) and #80 (comment)

This issue is to track the work to activate vspacecode menu when the focus is in the sidebar or panel. This ideally should allows <spc> w h/j/k/l to move freely around the panels/sidebar with the commands used in Quick Window Nav The shortcut binding like the following will allow vspacecode to execute when the focused on the sidebar and not on an input box such as the search box.

{
	"key": "space",
	"command": "vspacecode.space",
	"when": "sideBarFocus && !inputFocus && !whichkeyActive"
}

There are some issues with that:

  1. tapping escape on the input box doesn't defocus the input box
  2. <spc> and <esc> have meaning to debug console and terminal, so how should we defocus?

The comment #80 (comment) offers some workarounds, and a tracking issue on vscode main repo to implement a command to defocus.

Enable major mode support

As I said here:

In spacemacs you have major-modes, like "python", "markdown", and so on. So for example if you open a .md file ? spacemacs will use Markdown mode in that buffer.

When you are using a mode, key bindings under <spc> m or under , will be unique to that mode.

This means that when you are editing a markdown, <spc> m b could be assigned to "make bold", while in python <spc> m b could be assigned to "toggle breakpoint" (I am just inventing).

Maybe the discussion in the above linked issue could be relevant.

Develop a settings.json builder scripts

At the moment everything is done via manual updates, which are annoying.

Let's make a config file build-tool, which is able to merge user settings, with VSpaceCode key bindings.

Ideally VSpaceCode key bindings should be splitted in different files, one for each prefix (SPC f, SPC w, etc.).
This script (or another one) should generate documentation for VSpaceCode key bindings, too.

In other words people should be able to clone this repository and customize it with their own settings files. With this scripts they shall be able to generate the full settings.json file to be placed in VSCode. This file will contain both their settings and the VSpaceCode mappings.

An initial job has been done here.

This issue is a recap of what has been written in #1.

Add <SPC> j

This is used to track the work to add <spc> j and its required easymotion settings to both README and the configuration commands. I am in the process of refactoring the configuration commands, please hold off on that part if you are working this issue.

workbench error on fresh install

Hi,

I think it is neat that you guys are bringing Spacemacs keybindings to VSCode. It helps me try out VSCode.

I am running VSpaceCode 0.6 with VCodeVim version 1.15.0 on a fresh VSCode install on Ubuntu 20.04.

I opted for automatic configuration but I am running into the following error for the command "Space f f"

TaskQueue: Error running task. Failed to handle key= . command 'workbench.action.files.openFileFolder' not found.

Thanks!

Implement missing "yank/copy path" related commands

In spacemacs (develop branch) there are a lot of key bindings under <spc> f y that are missing in VSpaceCode.

Some related to file path:

  • <spc> f y c copies file path with line and column numbers, for example: /home/marco/VSpaceCode/CHANGELOG.md:39:15
  • <spc> f y d copies the directory path, for example: /home/marco/VSpaceCode/
  • <spc> f y l copies file path with line number, for example: /home/marco/VSpaceCode/CHANGELOG.md:39

The above key bindings have a version where instead of the absolute path, you refer to the project root, in my case /home/marco/VSpaceCode/

  • <spc> f y C copies file path with line and column, for example: CHANGELOG.md:39:15
  • <spc> f y D copies directory path, for example: ./
  • <spc> f y L copies file path with line number, for example: CHANGELOG.md:39

plus, you have:

  • <spc> f y n copies file name, for example: CHANGELOG.md
  • <spc> f y N copies file name without extension, for example: CHANGELOG

implementation

Here is an example implementation: https://marketplace.visualstudio.com/items?itemName=ezforo.copy-relative-path-and-line-numbers

Anyway there is no linked repository, so maybe it's not open source. Plus, stevenguh here said that using a lot of external extensions comes with an overhead, so we might want to implement and maintain those little actions in this extension.
These look simple to me, so I will add the good first issue label. Write here if you want to implement one of those actions :)

Commands in the README do not exist

The commands from the configuration section of the README do not exists.
This is what I have in v0.6.0

image

As you can see the names are different.

Should I just rename the commands in the readme with the first 3 of the picture?

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.