How do I dismiss an autocomplete suggestion in Atom? - atom-editor

When I'm writing Docstrings in Python3, I'm ending all of my sentences with periods and I see an autocomplete suggestion like this:
In this case it wants to replace the string "wager." with "wagerself."
If I press Enter or Tab the string replaces. I've messed around with all the logical buttons (Including adding an extra space which doesn't work), and nothing will allow me on my merry way to a newline.
This problem occurs both with and without the autocomplete-python package installed.
I do want to use auto-complete when I type a dot after an object, just not in the comments.
Is there a way to either:
Dismiss the autocomplete suggestion as they come up.
-- or --
Change the autocomplete to be aware of the context, i.e. not autocomplete dots when I'm in a string/comment.

From experimenting with different key combos, ctrl + enter will ignore the suggestion and allow you to go to the next line without altering what you've typed.
I haven't found any documentation around this, so I'm not sure if there's a similar key combo for tab or not. I couldn't find anything myself beyond alt + tabing to lose focus, which causes the suggestion to go away, then alt + tabing back to hit tab, which obviously isn't ideal.

I'm using Atom 1.44.0 on Windows and have found that shift + enter works to dismiss an autocomplete suggestion. No luck with tab on this platform though.

I use atom extensively, and have found that a quick left-right cursor move will leave the typed text in place and will NOT reactivate the suggestion list, unless more characters are typed. You can then type and move on to the next line.
I was actually searching myself for a way to exclude "then" from the autocomplete action, because I have text in other locations that has it as a commented "Then". I was hoping to find a way to exclude that word completely, but thought to share my work-around for that little bit, instead.

I am having the same problem where my text is getting replaced with cached words where if I wanted to type “manage” but if I have used “management “ before, I will get the text what I don’t want if I press enter. I went into preferences and followed the same steps mentioned in the below article and once the preferences are changed, I don’t see the word suggestions anymore. I felt so relieved.
https://elearning.wsldp.com/pcmagazine/disable-code-hints-atom-editor/

Related

Is there a way to preserve the highlight when wrapping a selection with quotes/brackets in RStudio?

In many IDEs, there's a feature where you can highlight a section of code and then press a key like ", ', (, or [ (to name a few) to surround the highlighted section with the corresponding open/close characters of the given key. In Jupyter Notebooks, the highlighted portion stays highlighted after surrounding the code with the desired characters. However, in RStudio the text cursor falls to the end of the highlighted section after pressing the key to surround the code with.
I find the behavior of this feature in Jupyter much more desirable since I can press either the left or right arrow keys to immediately place the text cursor on either side of the selected code (without touching the mouse no less). But in RStudio I find myself constantly surrounding code in parentheses or quotes then spamming the left arrow key to get the text cursor to the beginning of the code I just highlighted.
Is there a way to change this setting in RStudio to match the behavior in Jupyter Notebooks? This is the only other question I've found relating to this behavior in RStudio, but unlike OP I want to alter the behavior of this setting, not turn it off completely.
I have looked in Tools > Global Options... under the Code tab (per the link above), but don't see any obvious solution there.
EDIT: I found from this question that I can use Option+J and Option+L (Mac) or Alt+J and Alt+L (Windows) to navigate the cursor to the other end of a word quickly, but I'm still curious if anyone knows of a way to match the settings in RStudio with the behavior of Jupyter Notebooks.

How do i autocomplete using Tabnine

I have downloaded tabnine, which helps the developer to not write mistaken words like for example: "helpo" instead of "hello".
But i dont know which button autocomplete the guessed word in every moment. ( The guessed word is on grey). I tried ctrl+enter, alt+enter, which were the most logical, but i am lost.
Someone knows which are the correct keys?
It's the 'Tab' button. Can be a bit confusing initially.

How to quickly view a function's documentation when using jupyter-notebook

It seems that using '?' command is the only way.But this is too much trouble, need to run the function? in another cell.
I've tried shift+tab, but it does not work for me.
Shift + TAB displays popup with signature, docstring and type.
One can also keep open Inspector where documentation will be displayed while typing.

Assign <wbr> to specific characters within CSS style

I am new to CSS and web development in general. Hopefully there is a way to accomplish what I am trying to do. What I am trying to do is simple to explain, but I need to give some background info first, sorry for the length of the post.
I have created a webpage that is in the Tibetan language. Tibetan does not have spaces between words, it only has a character called a "tsheg" (་ - U+0F0B) that is used to separate every syllable. It also has a mark called a "shey" (། - U+0F0D) that comes at the end of phrases and clauses and sentences. Although sometimes it is doubled, after a shey is generally a space before the next line of text. When typing in Tibetan this space is represented not as a normal space (U+0020) but instead U+00A0, however when it comes to browsers and HTML/coding in general these two seem to behave the same.
In any Tibetan writing, the ideal aesthetic is for full justification. Traditionally there would be slight spaces placed between the tsheg marks and the shey marks to achieve a perfectly flush left and right alignment. (The exception would be the last line of a text, or a paragraph in contemporary formatting, does not need to be justified). It is acceptable for lines to break mid-word or mid-sentence, but never mid syllable. So the last character on any line is going to be either a tsheg or a shey. It is also not acceptable to start a line with a shey. In the last few years this has been easy to achieve for desktop publishing using MS Word, using "Thai Justification." However that option is not available even in other Office products, never mind outside of the Office environment. Other work-arounds have been to add invisible width characters after every tsheg and shey, allowing for wrapping at any point.
Now comes the question and difficulty. I am using distributed justification, and that seems to be the best option. It does not break syllables up, which is important. But it only wants to break at those spaces after shey marks, and it breaks elsewhere when there is a long string of text without a space, but if there is a space then it breaks there, sometimes stretch one or two syllables across an entire line, which is obviously not ideal.
Now, when coding the HTML of the text I can use the same work-around that is used for desktop publishing pre "Thai justification," I can add a <wbr> after every single tsheg, and this will not be visible to the end user and should allow cleaner breaking. However, there are two problems with this. But inserting that many <wbr> characters I am essentially doubling, or close to doubling, my character count, which can make the page take twice as long to load, even if half of those characters are invisible. However, more important is that it disrupts search functionality. Although you may see the word that has the syllables "AB" for instance, if you tried searching for AB you wouldn't find it, because the HTML sees "AB". And being able to search is kind of critical. Enough so that an ugly formatting is preferable to losing the ability to search and to be indexed properly. Obviously, since I need the site to be responsive and I do not know what size screens will be used I cannot have forced line breaks, either, another trick used when publishing.
So, finally, my question. Is there a way I can define a style or function or some sort of element that automatically associates a certain character--in my case the tsheg character--as having a <wbr> command after it without actually needing to input that command into my HTML? So when the text is justified it treats every tsheg as a <wbr>? I have a class .Tibetan in my stylesheet that defines the font and the justification and so forth, is there some way I can add some code there that achieves what I am looking for?
The one other thing I tried was replacing all of the spaces with which gave a beautiful justified appearance but it also caused the browser to disregard the tsheg marks entirely and it allowed for the cutting in half of syllables.
If you want to see an example of what I am talking about you can visit this page of my site: http://publishing.simplebuddhistmonk.net/index.php/downloads/critical-editions/ and next to the word "English" click the Tibetan characters and that will bring up a paragraph of prose, or you can look here: http://publishing.simplebuddhistmonk.net/index.php/downloads/tibetan/essence-of-dispelling-errors-tib/ (though the formatting on that latter page is less egregious than the former, at least on my screen).
EDIT It looks like the solution this person used might be able to be adapted for my use: Dynamically add <wbr> tag before punctuation however I do not actually understand what I would need to add, and where, to make that work for me. Anyone think that might apply to this scenario? And if so, what code would I add where?
NEW EDIT So, I think the problem might be with the search function that comes from my WordPRess theme. I used my workaround as mentioned above, adding the tag after every tsheg, on this page: http://publishing.simplebuddhistmonk.net/index.php/downloads/tibetan/essence-of-dispelling-errors-tib/ and as you can see, it displays perfectly. But if you search for any phrase from that page using the search function that is up in my header, it will not find it. If you do a Ctrl+F and search on the page, though it will find it. Even if you copy the text from the page and paste it into the search box it still does not find it. Copy the text into a word editor doesn't reveal any hidden or invisible characters. However, if you search for a term from this page http://publishing.simplebuddhistmonk.net/index.php/downloads/tibetan/beautiful-garland-ten-innermost-jewels-tib/ which I have not added the tags to, you will see that it finds it no problem.
So, that leads me to believe the error is in the search function. Any experience with this? Because search is important but I can quite possibly find alternative earch widgets to replace the one that comes with the theme. What is most important though is if you search for a line of text on Google it needs to be found. My site has not been indexed fully by any search engine so I cannot yet confirm if this does or does not affect them.
So.... At this point I wil take any advice I can get. Any advice regarding the original question (is there a way to tell the style guide "if your are displaying X then treat it like X" ) or any idea about this issue with the search functionality, and how the tag may or may not affect search, both from within the site and also from search engines.

How to create Numeric KB interface with previous, next and done button

I was on website on my iPhone and I encounter websites' guestbook. with those textFields. my keyboard appearance was totally change as you can see in screen below.
I am having many text fields in my app, I am wondering if I can create anything like that.
As I am new to development, still unknown what are the limits.
Can anyone guide me to right direction or to right documentation.
Is there is some regular way or its just total customization over Keybard.
I have one more doubt, does it matter what kind of keyboard is popping up as my all fields have numeric keyboard.
Well I just wanted to be helpful to someone who is following the same learning curve as me.
To achieve the affect in screenshot in question. UIToolbar control can be used to make those buttons. after the you need to just make this toolbar appear and disappear with the keyboard.
To make previous and next button work, you can use the tag property of textfield. on clicking on previous or next you can focus to previous or next text field.
Sorry about not posting code as I have not coded it yet but wanted to give pointer to anyone, who is looking.

Resources