Skip to main content
Stack Overflow
  1. About
  2. For Teams

Timeline for A macro to remove the first space

Current License: CC BY-SA 4.0

9 events
when toggle format what by license comment
Apr 30, 2024 at 3:30 comment added shantanuo It is pretty simple, but unfortunately not able to do it. I prefer a single procedure instead of 2 functions as currently being use.
Apr 29, 2024 at 6:54 comment added H3coder For your case, it could be simplified to a single function. You'll have to put what you want to replace inside a list, then put the main portion inside a loop. Should be pretty simple.
Apr 28, 2024 at 5:33 comment added shantanuo This is working as expected. But can I use a single function instead of 2? gist.github.com/shantanuo/1ae004359c4aadfa67c514c0c9de9ba0
Apr 28, 2024 at 5:32 vote accept shantanuo
Apr 28, 2024 at 5:12 comment added shantanuo Ok. I understand that. But I do not need to change "bys" to "byś". Just make sure that the first space before the word is removed and the second space next to word is kept. There are about 8 to 10 such words (for e.g. 'ed', 'ing', 'bys').
Apr 25, 2024 at 10:21 comment added H3coder With the way it's written now, I don't think it's possible to run the spell check on it as well because it does the search and replace in the entire document at once. The code will need to be rewritten to iterate over each replacement, and do spell check individually.
Apr 24, 2024 at 9:54 history bounty awarded shantanuo
Apr 24, 2024 at 9:54 comment added shantanuo Very close. "bys" is replaced by "byś" and a space at the beginning is removed. But the question is slightly different. The resulting word should be a valid word as per spell check! After running your macro "do bys" becomes dobyś or "test bys" becomes "testbyś" but it does not check hunspell affix or dict file. This is very important.
Feb 17, 2024 at 3:31 history answered H3coder CC BY-SA 4.0

AltStyle によって変換されたページ (->オリジナル) /