Coder Social home page Coder Social logo

vintageous-origami's Introduction

Vintageous Origami

Origami is an awesome Sublime Text plugin that lets you conveniently configure your panel layout using shortcut keys.

Vintageous Origami adds pane management shortcut using Origami functionality similar to Vim's window managment. It tries to match as best as possible Vim behaviour. Origami's shortcuts are also available through the familiar Vim ctrl+w shortcut.

Notes

  • These bindings are only available in command mode (not insert mode).

To use this with Vintageous, first press ctrl+w, then press one of following key

  • v ctrl+v: Vertical split
  • s S ctrl+s: Horizontal split
  • c: Close pane
  • n ctrl+n: New horizontal split with empty file
  • o ctrl+o: Make current pane the only one
  • l, <right>: Move to right pane
  • h, <left>: Move to left pane
  • k, <up>: Move to up pane
  • j, <down>: Move to down pane
  • L: Exchange with right pane
  • H: Exchange with left pane
  • K: Exchange with up pane
  • J: Exchange with down pane

Also adds custom bindings:

  • x: Close window
  • X: Close all windows

The following Origami bindings are still available after pressing ctrl+w.

  • no modifiers: travel to an adjacent pane

The following Origami bindings will not work.

  • shift: carry the current file to the destination
  • alt(option): clone the current file to the destination
  • super: create an adjacent pane
  • super+shift: destroy an adjacent pane

(Note: Windows and Linux use ctrl instead of super.)

Commands

The following basic commands are implemented:

  • :sp[lit]: Horizontal split
  • :vne[w]: Vertical split with new file

By default, the plugin overrides the following command provided by Vintageous to provide a behaviour that is more consistent with Vim's

  • :vs[plit]: Vertical split
  • :new: Horizontal split with new file
  • :on[ly]: Make current pane the only one

Each of the override can be toggle with the appropriate settingfollowing preferences vintageous_origami_override_command_vsplit

Settings

See Vintageous-origami/Preferences.sublime-settings for a comprehensive list of settings.

Install

Make sure you have Origami installed already:

https://github.com/SublimeText/Origami

Make sure you have Vintageous installed already:

https://github.com/guillermooo/Vintageous

Enable Vintageous to use ctrl keys in your preferences

`"vintageous_use_ctrl_keys": true`

This plugin is available through Package Control.

Manual Install

First make sure Origami is already installed:

https://github.com/SublimeText/Origami

Go to your Packages subdirectory under ST3's data directory:

  • Windows: %APPDATA%\Sublime Text 3
  • OS X: ~/Library/Application Support/Sublime Text 3
  • Linux: ~/.config/sublime-text-3
  • Portable Installation: Sublime Text 3/Data

Then clone this repository:

git clone https://github.com/rodcloutier/Vintageous-Origami.git

Todo

  • Add support for arguments to :sp :vs :new :vnew

Inspired by https://github.com/garyc40/Vintage-Origami

vintageous-origami's People

Contributors

albertogg avatar rodcloutier avatar thelogicdump 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

Watchers

 avatar  avatar  avatar  avatar  avatar

vintageous-origami's Issues

Swap place with file

Hi,

thanks for the awesome package.

When using ctrl+w shift+l or ctrl+w shift+h, the current file is moved to that column, whereas in vim, the equivalent swaps position with that file.

Thank you :)

Windows 10 or wsl support

This doesnt seem to work on windows-style keyboards. Ctrl-w closes the window by default. Ctrl is positioned differently and win+w, alt+w dont work

:only no longer works

Instead of closing all other panes, it just closes all files in other panes, leaving the panes intact.

ctrl+w, k/j

Is it possible to implement the ability to navigate the windows using typical vi/vim commands like ctrl+w, k to go up or ctrl-w, j to go down? I see that we can go left or right with the ctrl+w, h/l.

Thanks for all the hard work.

Stops working with latest Vintageous 4 release

Linux / ST3 build 3065 / Vintageous ~4.0

Console log on startup

reloading plugin VintageousOrigami.action_cmds
reloading plugin VintageousOrigami.xactions
Traceback (most recent call last):
  File "/home/user/sublime_text_3/sublime_plugin.py", line 73, in reload_plugin
    m = importlib.import_module(modulename)
  File "./importlib/__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/home/user/sublime_text_3/sublime_plugin.py", line 671, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "xactions in /home/user/.config/sublime-text-3/Installed Packages/VintageousOrigami.sublime-package", line 106, in <module>
ImportError: No module named 'Vintageous.ex.ex_command_parser'

See also guillermooo/Vintageous#903

This is a very good example of why package version dependency management would be a very good thing. Ping sublimehq/sublime_text#615

Package control thinks its an ST2 plugin

For whatever reason, Package Control 2.0 thinks this plugin is for ST2, which you can see here. So, it won't install it into ST3 for me. The Package Control Channel has changed a lot, and it looks like your plugin is incorrectly labelled like this:

         {
            "name": "Vintageous Origami",
            "details": "https://github.com/rodcloutier/Vintageous-Origami",
            "releases": [
                {
                    "sublime_text": "<3000",
                    "details": "https://github.com/rodcloutier/Vintageous-Origami/tree/master"
                }
            ]
        }

A quick adjustment to this should fix it.

Most features don't work

I just installed and none of the bindings worked. Copied all of the bindings into Default (OSX).sublime-keymap and ctrl-w v worked as well as navigation between panes, but nothing else.

plugin broken with ST3?

Hey Rod

I tested this plugin on the latest stable Beta build of ST3 (build 3065). A few controls work, others don't.

I have Vintageous and Origami installed, and option: "vintageous_use_ctrl_keys" is set to true.

WORKS:
v ctrl+v: Vertical split
c: Close pane
o ctrl+o: Make current pane the only one
l, : Move to right pane
h, : Move to left pane

DOESN'T WORK:
s S ctrl+s: Horizontal split
n ctrl+n: New horizontal split with empty file
k, : Move to up pane
j, : Move to down pane
L: Exchange with right pane
H: Exchange with left pane
K: Exchange with up pane
J: Exchange with down pane
x: Close window
X: Close all windows
The commands also don't work
:vs[plit]: Vertical split
:sp[lit]: Horizontal split
๐Ÿ†• Horizontal split with new file
:vne[w]: Vertical split with new file
:on[ly]: Make current pane the only one

Any help is appreciated!

Tagged based releases

Start using tagged based releases.

One reason is that the recent release of Vintageous 4 broke Vintageous Origami. My suggestion is to:

Ping #15

Recent Changes to Vintageous break imports

Looks like some recent changes to Vintageous break some imports in Vintageous-origami

Getting this error
from Vintageous.vi.cmd_defs import cmd_types
ImportError: cannot import name cmd_types
reloading plugin Vintageous-Origami.xactions

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.