Coder Social home page Coder Social logo

smart-tabs's Introduction

This is a FORK of https://github.com/vim-scripts/Smart-Tabs

Changes:

- Add fix for 'O' leaving trailing whitespace with expandtab on
- Merge b:ctab_lastalign fix from @skroll
- Merge increase supported line size from @skroll
- Merge fix for ts==0 from @nilium
- Handle sts==-1 by using sw instead (per vim behavior)
- Merge two fixes for breaking lines from @mdlerch
- Merge fix for <BS> deleting incorrect number of spaces from @mmedved

Changes are licensed under the same terms as the original

===============
Original README
===============

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

There are many different arguments about tabs and stuff.  My current personal preference is a choice of tabbing that is independent of anybody&#039s viewing settings.  

For the beginning of the line, this means we can use <tabs> which will expand whatever the reader wants it to.  Trying to line up tabs at the end of the line is a little trickier, and making a few assumptions, my preference is to use spaces there.

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.

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.

smart-tabs's People

Contributors

jpmv27 avatar mdlerch avatar skroll avatar powerman avatar nilium avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.