Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sort a indent file #7

Open
juanpabloaj opened this issue Feb 12, 2012 · 1 comment
Open

sort a indent file #7

juanpabloaj opened this issue Feb 12, 2012 · 1 comment

Comments

@juanpabloaj
Copy link

I use indent-object for sort a block of indent files (css, python) with this map

   nmap <Leader>ss vii!sort<cr>

example, in a css file

  width:100px;
  height:100px;

<leader>ss

  height:100px;
  width:100px;

but how I can sort a complete file ? example:

 footer {
        width:100px;
        height:100px;
 }
 body {
        color: #000;
 }

to

 body {
        color: #000;
 }
 footer {
        height:100px;
        width:100px;
 }
@michaeljsmith
Copy link
Owner

Hi Juan,

I'm afraid I'm not aware of any way to use sort to do this. Seems like
you need some kind of sort command that works on whole subsections of
files - perhaps with folds.

Sounds like an idea for another plugin :)

On 13 February 2012 04:12, JuanPablo
reply@reply.github.com
wrote:

I use indent-object for sort a block of indent files (css, python) with this map

      nmap ss vii!sort

example, in  a css file

     width:100px;
     height:100px;

<leader>ss

     height:100px;
     width:100px;

but how I can sort a complete file ? example:

    footer {
           width:100px;
           height:100px;
    }
    body {
           color: #000;
    }

to

    body {
           color: #000;
    }
    footer {
           height:100px;
           width:100px;
    }


Reply to this email directly or view it on GitHub:
#7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants