Code Monkey home page Code Monkey logo

Comments (14)

bseymore avatar bseymore commented on July 30, 2024

I just tried this on my system and it works as expected — with the keyboard shortcut, the numbers are inserted before the semicolon, with no extraneous white space, like in your fourth example.

This is with SublimeText 3 (Build 3061) and Text Pastry 1.3.5 on an OS X 10.9.2 machine.

from text-pastry.

amclain avatar amclain commented on July 30, 2024

Looks like this may be an interaction with the Vintage plugin. I was able to catch that opening the Text-Pastry command line via the Sublime command palette forces Vintage out of insert mode (| cursor) and into command mode (_ cursor).

So when the editor is in insert mode, this is how the cursors appear:

command_1 = |;
command_2 = |;
command_3 = |;
command_4 = |;

Debug output:

(12, 12)
(27, 27)
(42, 42)
(57, 57)

Opening the Text-Pastry command line from the Sublime command palette then bumps the editor into command mode, changing the cursor to:

command_1 =_;
command_2 =_;
command_3 =_;
command_4 =_;
(11, 11)
(26, 26)
(41, 41)
(56, 56)

I should note that commands like Text Pastry: From 1 To X do keep the editor in insert mode and behave correctly, but it's starting to look like this may actually be an issue with Vintage.

I'm on ST3 build 3059 on various Win 7 and Linux machines, same configuration and same behavior for all.

from text-pastry.

duydao avatar duydao commented on July 30, 2024

I'm unfamiliar with the vintage plugin, but I'll take a look. Does this also happen with an other plugin?

from text-pastry.

duydao avatar duydao commented on July 30, 2024

@ bseymore thanks for the quick check!

from text-pastry.

amclain avatar amclain commented on July 30, 2024

Whoops, I got my plugin names mixed up. Vintage and Vintageous are Vim emulator plugins. I meant to say Vintageous previously.

Vintage ships with Sublime Text 3 but is an ignored package in the default config. It's enabled by removing it from the ignored packages list. I enabled this plugin and it does seem to work correctly with Text-Pastry.

Vintageous is a rewrite of Vintage; they should not be enabled at the same time. With this plugin enabled, the undesired behavior returns.

Based on this, it looks like the bug may be due to Vintageous changing the cursor mode when the Sublime command palette is opened. It just so happens that I noticed the bug because I do frequent text insertion with Text-Pastry this way, making it appear like it was the plugin at fault.

from text-pastry.

duydao avatar duydao commented on July 30, 2024

OK, thanks for clarifying!

from text-pastry.

duydao avatar duydao commented on July 30, 2024

I'll take another look at this

from text-pastry.

duydao avatar duydao commented on July 30, 2024

@amclain I tried to reproduce this bug, but it worked as expected. can you confirm that this still is a problem?

Steps

  • paste text
  • press i to enter insert mode
  • place cursor like described:
constant_1 = |;
constant_2 = |;
constant_3 = |;
constant_4 = |;
  • open command palette with shortcut OR open TP Command line with shortcut
  • enter 1 10 0

Result

  • the expected numbers were inserted
  • the numbers were selected
  • vintageous was still in edit mode

Note
I've tried this on a mac, will try on a windows plattform shortly

from text-pastry.

duydao avatar duydao commented on July 30, 2024

@amclain I was able to reproduce this problem, checking for a workaround

from text-pastry.

duydao avatar duydao commented on July 30, 2024

relevant lines in vintageous are:

on_deactivate, 80-82

on_activate, 56-58

from text-pastry.

duydao avatar duydao commented on July 30, 2024

Basically, vintageous will reset its mode to "normal mode" after losing focus. I've asked the creator of vintageous to add an option to enable/disable this behaviour. Can't do anything else, sorry.

from text-pastry.

amclain avatar amclain commented on July 30, 2024

Thanks for tracking down the lines of code in Vintageous that were causing the problem! I understand this is their problem and not yours, but what you were able to find looks like a big help.

from text-pastry.

Kcko avatar Kcko commented on July 30, 2024

Hi Bro,

sequence i or \i (not work -- generate only "i").
When i change this to \i(1) or i1 its works....

it worked in the past, can u tell me why? :]]

Scr: http://files.rjwebdesign.cz/i/20150120-151153---1487x1028---t---pn.png

S pozdravem

Roman Janko
webdesigner & developer

gsm: [+420] 777 856 657
email: [email protected] mailto:[email protected]
icq: 176-031-471
www: rjwebdesign.cz http://rjwebdesign.cz
linkedin: linkedin.com/in/romanjanko
http://www.linkedin.com/in/romanjanko
twitter: twitter.com/RomanJanko https://twitter.com/RomanJanko

Rjwebdesign logo

Dne 7.6.2014 v 18:01 Duy Dao napsal(a):

I'll take another look at this


Reply to this email directly or view it on GitHub
#16 (comment).

from text-pastry.

duydao avatar duydao commented on July 30, 2024

Thanks for reporting this issue, I've created #27 for this bug

from text-pastry.

Related Issues (20)

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.