How to set the tab size as 2 for a file permanently in vim as whenever I open a file in other editors like nano or upload the file in github then my indentations are all incorrent whenever I try to resize the tab to 2 for an existing file which has all incorrect indentations. The tab-stop=2 does not permanently resizes the tab and I see all incorrect indentation when I open the same file in nano or view it in github.
set tab-stop = 2 in vim permanently for a file
965 Views Asked by Akash At
1
There are 1 best solutions below
Related Questions in VIM
- Firefox vim mode, can't switch to normal mode in style editor
- How to skip a command in redo
- Vim errorformat multiline string
- How to let Vim tell the switching across several `gvim.exe` processes?
- match wordchar and/or dot string of anylength
- augment the number of lines on indent
- Barebones vim with `nocp`
- Moved .vimrc in a new dir, trying to get it to work
- Copying text from gvim editor to system clipboard works only once per session
- Temporarily declare a word as wrong in vim spellchecker
- Automatically switch back to NerdTree after pressing "o" on file
- How to use Ctags to list all the references of a symbol(tag) in vim?
- Vim + Airline + Linux sloppy exit
- How to delete a WORD in vim in insert mode
- Prevent single letter deletes to spam clipboard manager
Related Questions in TABS
- SWT CTabFolder doesn't display when running from eclipse
- Composite Server Templates tabs
- Preference Screen in SlidingTabLayout
- Android: Table swipe in fragment goes too far
- Is it possible for chrome to nest tabs within a tab?
- Same Tab content over three different pages, how to active the coreesponding tabs according to the page id wordpress
- How to add a WebView as a content to a tab in JavaFX?
- Responsive Image on ionic Tab bar
- Show table when its tab is clicked but hide other tables
- Change TabItem's Header FontWeight
- Can I force to keep the chrome tab open via extension?
- Chrome.runtime.onMessage.addListener on new tab not receiving message from popup.js
- Tabs in TabLayout not filling up entire ActionBar
- jquery ui datepicker not working with tabs
- ResponsiveTabs add onclick in js file
Related Questions in PERMANENT
- PHP - Permanently changing array values
- Avoid accuracy problems while computing the permanent using the Ryser formula
- How to keep MVC5 from clearing controller output cache
- subdomain and subfolder .htaccess
- How can I make a permanent 2d list(Python)
- Android SQLite permanent data
- Permanent PowerShell variable
- PHP "permanent variable"
- Redirect permanent when URL source contains a "?"
- Is it possible to get a permanent download link via Vimeo API
- How do I completely nuke a file from a git repo?
- htaccess experts: Redirect all but root to one TLD, redirect root to another TLD - WordPress
- Permanently edit webpages?
- Is there a way to share a variable (within a shared lib) between processes?
- set tab-stop = 2 in vim permanently for a file
Related Questions in TAB-SIZE
- How to change tab size on GitHub?
- How do I set the tab size in the output window of Visual Studio 2010?
- Convert start of String from 2 spaces to 4 spaces
- set tab-stop = 2 in vim permanently for a file
- Change the tab stop (\t) size in Spyder's IPython Console
- How to set tab size in JTextPane
- Vue Prism Editor - set tabSize
- emacs: Want to indent with tabs (tab-size 2 or 4) allign with spaces
- How to change the size of a Text View in Xcode?
- Mixing tabs and spaces without mixing tabs and spaces
- How to set tab size for hunks in "git add -p"?
- How to configure tabwidth in djhtml?
- Setting tab size in Emacs
- Different tab sizes depending on the language/file I'm programming in VS Code
- Panel (Frame) size in Visual Studio Code (VSCode)
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Tabs don't have an inherent size so it is up to each program to decide how to display them and there is simply no way to guarantee that a tab will always look the same everywhere.
This is precisely the main issue people have with tabs: you can tell $SOME_TOOL and $SOME_OTHER_TOOL that a tab takes two spaces but that setting can't possibly be carried over to every tool.
Modelines are editor-specific (and they are too intrusive anyway) and Editorconfig is not universally supported so there is really no universal solution beyond using spaces for indentation.