Unlimited line length Sublime 3 - sublimetext

How make maximum length of line in Sublime 3 unlimited?
I've tried to add "max_line_length": null, or even "max_line_length": 10000" to Preferences.sublime-setting, but it not works for me.

Just uncheck wordwrap flag in View menu.

Related

vscode-go input tabs of size 4 instead 8

I have Visual Studio Code Insiders installed. Basically I've installed Go extension from Microsoft and written simple hello world app. Now I always use spaces to indent my code, but I saw that it changed to tabs of size 4. So I thought: yay, what a nice extension, now I can start to write my code.
Then I remembered, that the default code indent from gofmt should be 8 as tabs. And I checked. gofmt main.go indeed outputs my code with tabs of size 8. But vscode keeps doing tabs of size 4. I thought maybe it doesn't even call gofmt but when I go RPM->Format document with - it actually does. But still, tabs of size 4. What am I doing wrong in this scenario?
"editor.renderWhitespace": "all",
"editor.fontFamily": "Hack",
"editor.fontSize": 12,
"editor.minimap.enabled": false,
"editor.fontLigatures": true,
"workbench.editor.enablePreview": false,
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.cursorSmoothCaretAnimation": true,
"editor.detectIndentation": false
Those my only editor settings and I dont have any custom settings regarding Go extension
go fmt uses tab characters ("\t") to indent the beginning of a line. How a tab is displayed (tab width) is up to your text editor or IDE. I have Tab Width set to 4 in my text editors. My terminal program uses a tab width of 8.
For example, for xed,
Editor Preferences
Tabs
Use the Tab width spin box to specify the width of the space that xed
inserts when you press the Tab key.
Select the Insert spaces instead of tabs option to specify that xed
inserts spaces instead of a tab character when you press the Tab key.

Sublime indentation on per file basis

Using Sublime Text 3. When opening files, some of them have indentation of 2 spaces (while the majority have 4 spaces).
Is there any way to set indentation on per file basis?
In menu select View » Indentation » Tab Width: 2 to set indentation to 2 spaces for the opened file only. Next time you reopen this file Sublime Text guesses the indentation if it is 2 or 4 spaces based on the indentation found in the specific file.
Note: This can technically only work with spaces as indentation. If tabs are used as indentation there is no way to set the tab width on a per file basis, but on a per file type basis.

How to Add tab space to multilple line at the same time in any text editor

If you select a text you can add multiple tab spaces to the all lines simultaneously.
For that you must select the n lines of the code and press the key tab. If you want
remove the tab spaces should select the text and press shift+tab.
I was programming in my job and I accidentally discovered this in the IDE eclipse. I test the same process
in the Sublime Text and Geany and it works too.
Y suposse and pressume that works for the most of text editor
I can confirm the answer from kelgwiin for sublime text.
Depending on your platform you could also do the following in sublime text:
Linux: Hold shift and the right mouse button, then move the mouse up or down to make a column selection.
Windows + OS X: Simply hold down the mousewheel and move your mouse up and and down to select the columns.
Hope this helps!
On Geany you can create by using Alt+Shift+Mouse (Windows) or Ctrl-Shift-Mouse (*x) a multiline cursor or an rectange selection, where you can work on many lines at the same time. This is only working for lines 'in row' so you cannot choose line 9 and lines 12-16 and lines 23-44 to be edited at the same time.

How can I configure sublime to always use 4 spaces?

I know that sublime has the following space-related settings:
Preferences.sublime-settings
{
"tab_size": 4,
"translate_tabs_to_spaces": true,
"use_tab_stops": false
}
I think this means:
tab_size: When I press Tab I get 4 spaces (or a tab length of 4, depending on wheather it makes tabs or spaces)
translate_tabs_to_spaces: When I save a document it will translate tabs to spaces
use_tab_stops: (only relevant for spaces) Sublime will not simply enter 4 spaces, but will eventually add less spaces to get to the next tab position.
But although I have this configuration, I see all the time:
My project.sublime-project has:
...
"settings":
{
"tab_size": 4,
"translate_tabs_to_spaces": true,
"use_tab_stops": true
}
...
How can I tell sublime to always use 4 spaces? (except for Makefiles, where it has to use tabs. But the focus of thes question is on 4, not on spaces)
I have Linux Mint 16 Petra and Sublime Text build 3059
The problem you have stated is happening because your current file has indentation of 2 spaces and ST is using the auto detected indention as it has the highest priority in all Preferences1.
Add below line to Preferences"detect_indentation": falseSo that it won't change the indentation setting automatically.

Textmate 2 indentation with Python

When I indent by tabbing "Tab" key, the tab is replaced by 4 spaces. Does anyone know how could I set it to normal?
At the bottom of the editor window there is a menu for tab size, you can set the desired width there as well as turning on soft tabs which inserts spaces instead of tabs but treats them as tabs when editing. Your choice will be saved based on the active file type so make sure to set it when in a python file.

Resources