Skip to content

daved/Smart-Tabs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

This is a fork of of http://www.vim.org/scripts/script.php?script_id=231

This script allows you to use your normal tab settings for the beginning of the line, and have tabs expanded as spaces anywhere else.  This effectively distinguishes 'indent' from 'alignment'.  

<tab>  Uses editor tab settings to insert a tab at the beginning of the line (before the first non-space character), and inserts spaces otherwise.
<BS>  Uses editor tab settings to delete tabs or 'expanded' tabs ala smarttab

 :RetabIndent[!] [tabstop]
    This is similar to the :retab command, with the exception that it  affects all and only whitespace at the start of the line, changing it to suit your current (or new) tabstop and expandtab setting.  With the bang (!) at the end, the command also strips trailing  whitespace.

g:ctab_pumvisible can be set and it's value will be 'used' when tab is pressed while a popup is visible.

CAUTION: After 1.1, this is no longer a filetype plugin by default ( set g:ctab_filetype_maps=1 to override)

Using spaces for alignment of code under unmatched brackets is now supported.

About

Use tabs for indent, spaces for alignment

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vim Script 100.0%