What Emacs users should know when writing python code in Sublime Text

What emacs users should know when using Sublime Text

If you are a user who uses emacs on a daily basis but writes python in Sublime Text, you may lose it if you do not know it, so I will summarize it briefly. (Because I'm a mac user, I can't verify windows, but it should have the same function.)

(1) How to add a character string to any selected location

You can select any location with command + left click, and you can add or edit characters there. I don't know how to do this with emacs. Very convenient!

For example, after writing a character string, if you want to add a line break to all, you can enter the character by selecting the place you want to insert with ⌘ + left click.

sublime_command.png

(2) You can also select a rectangle with Sublime Text!

Rectangle (short) choices aren't just for emacs. "Hold Opt and left-click and drag" Then you can select in the rectangular area. Of course, you can delete it with del after this, or replace it with a string.

--Reference page: https://qiita.com/seafield1979/items/56d4833dae818dcf85ae

(3) Why do I get angry with indentation when using Sublime Text? ??

This is a problem not limited to sublime Text, but it is caused by "mixing soft tabs and hard tabs". The reason why sublime Text is a problem is that by default it is a tab with 4 spaces, so it looks like it is indented. For example, a common pattern. If you look at emacs, you can see that they are clearly out of alignment, but with sublime Text, they seem to be aligned (this depends on the settings).

indent.png

The solution is simple, ** "Select all and check for mixed dots (....) and dashes (----)" ** in one shot.

--Reference: https://www.sejuku.net/blog/86942

(4) Replacement method shortcut

It may be hard for emacs users to remember, but you can replace it with "Cmd + Opt + F". There is a way to change the settings to emacs style.

--Reference: https://qiita.com/fujimohige/items/feb915c55a034029e513

Recommended Posts

What Emacs users should know when writing python code in Sublime Text
A memorandum when writing experimental code ~ Logging in python
GOTO in Python with Sublime Text 3
Reading and writing text in Python
When writing a program in Python
What Rubyist should know when using pyenv
[Tips] Easy-to-read writing when connecting functions in Python
What to do if a Unicode Encode Error occurs in Sublime Text Python
Split files when writing vim plugin in python
[Question] What happens when I use% in python?
Ruby, Python code fragment execution of selection in Emacs
Tips you should know when programming competitive programming with Python2
Clustering text in Python
Before writing Python code
Text processing in Python
Master the type in Python? (When should type check be done)
What I was addicted to when migrating Processing users to Python
Code block when writing console (shell) command execution in Qiita
Convenient writing method when appending to list continuously in Python
What to do when "SSL: CERTIFICATE_VERIFY_FAILED _ssl.c: 1056" appears in Python
Insert type stamp in Sublime Text (automatically updated when saved)
Always check PEP8 while editing Python source code in Emacs
UTF8 text processing in python
Attention when os.mkdir in Python
Speech to speech in python [text to speech]
Generate QR code in Python
What I learned in Python
Character code learned in Python
[Subprocess] When you want to execute another Python program in Python code
Mode line when you open the appropriate Python code in Vim
Settings when writing Google App Engine / Python apps in Intellij Idea
Tips you should know when programming competitive programming with Python2 (useful library)
[Python ORM] Notation when writing SQL using subquery in IN clause in SQLAlchemy
Articles to read when Blender Python script code doesn't work in 2.80
What to do when ModuleNotFoundError: No module named'XXX' occurs in Python
What to do when the value type is ambiguous in Python?
[SEO] Flow / sample code when using Google Analytics API in Python
Don't forget shebang when writing Check! Ansible's Dynamic Inventory in python!