Modify file sort by name in vim netrw plugin (old version) in Cygwin?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















Due to security, tight control of user rights, and understaffed IT, I have very limited opportunities to upgrade my Cygwin installation. I am using netrw version v149 plugin for vim, which sorts files like so:



20181217.1904+20190101.1954.zip*
20181217.1904+20190102.1731.zip
20181217.1904.zip*


I find this odd, since bash lists the files like so:



20181217.1904.zip*
20181217.1904+20190101.1954.zip*
20181217.1904+20190102.1731.zip


In both cases, the sort is by file name, in ascending order. However, the netrw sort seems to treat the "+" character as preceding ".", while the reverse is true in the bash sort.



I find the latter to be much more useful, and wonder how it is that the plugin is using a different character precedence. Is there a simple and pain-free way to get the second sorting scheme in netrw v.149?










share|improve this question

























  • For me, both ls and netrw sort like in your first output. ASCII + (decimal 43) comes before ASCII . (decimal 46), so this looks fine to me. I don't think there's anything wrong with netrw, nor that you can influence that particular behavior there.

    – Ingo Karkat
    Jan 9 at 10:31











  • Hope I wasn't implying that netrw was wrong. The different sort behaviours were just an observation, with the second one being more useful for me. You might be right about there being no way to change the netrw behaviour. I'd be more certain of that, however, if I knew what was behind the difference in behaviour.

    – user36800
    Jan 10 at 19:19


















0















Due to security, tight control of user rights, and understaffed IT, I have very limited opportunities to upgrade my Cygwin installation. I am using netrw version v149 plugin for vim, which sorts files like so:



20181217.1904+20190101.1954.zip*
20181217.1904+20190102.1731.zip
20181217.1904.zip*


I find this odd, since bash lists the files like so:



20181217.1904.zip*
20181217.1904+20190101.1954.zip*
20181217.1904+20190102.1731.zip


In both cases, the sort is by file name, in ascending order. However, the netrw sort seems to treat the "+" character as preceding ".", while the reverse is true in the bash sort.



I find the latter to be much more useful, and wonder how it is that the plugin is using a different character precedence. Is there a simple and pain-free way to get the second sorting scheme in netrw v.149?










share|improve this question

























  • For me, both ls and netrw sort like in your first output. ASCII + (decimal 43) comes before ASCII . (decimal 46), so this looks fine to me. I don't think there's anything wrong with netrw, nor that you can influence that particular behavior there.

    – Ingo Karkat
    Jan 9 at 10:31











  • Hope I wasn't implying that netrw was wrong. The different sort behaviours were just an observation, with the second one being more useful for me. You might be right about there being no way to change the netrw behaviour. I'd be more certain of that, however, if I knew what was behind the difference in behaviour.

    – user36800
    Jan 10 at 19:19














0












0








0








Due to security, tight control of user rights, and understaffed IT, I have very limited opportunities to upgrade my Cygwin installation. I am using netrw version v149 plugin for vim, which sorts files like so:



20181217.1904+20190101.1954.zip*
20181217.1904+20190102.1731.zip
20181217.1904.zip*


I find this odd, since bash lists the files like so:



20181217.1904.zip*
20181217.1904+20190101.1954.zip*
20181217.1904+20190102.1731.zip


In both cases, the sort is by file name, in ascending order. However, the netrw sort seems to treat the "+" character as preceding ".", while the reverse is true in the bash sort.



I find the latter to be much more useful, and wonder how it is that the plugin is using a different character precedence. Is there a simple and pain-free way to get the second sorting scheme in netrw v.149?










share|improve this question
















Due to security, tight control of user rights, and understaffed IT, I have very limited opportunities to upgrade my Cygwin installation. I am using netrw version v149 plugin for vim, which sorts files like so:



20181217.1904+20190101.1954.zip*
20181217.1904+20190102.1731.zip
20181217.1904.zip*


I find this odd, since bash lists the files like so:



20181217.1904.zip*
20181217.1904+20190101.1954.zip*
20181217.1904+20190102.1731.zip


In both cases, the sort is by file name, in ascending order. However, the netrw sort seems to treat the "+" character as preceding ".", while the reverse is true in the bash sort.



I find the latter to be much more useful, and wonder how it is that the plugin is using a different character precedence. Is there a simple and pain-free way to get the second sorting scheme in netrw v.149?







vim cygwin netrw






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 4 at 5:00







user36800

















asked Jan 3 at 22:14









user36800user36800

689418




689418













  • For me, both ls and netrw sort like in your first output. ASCII + (decimal 43) comes before ASCII . (decimal 46), so this looks fine to me. I don't think there's anything wrong with netrw, nor that you can influence that particular behavior there.

    – Ingo Karkat
    Jan 9 at 10:31











  • Hope I wasn't implying that netrw was wrong. The different sort behaviours were just an observation, with the second one being more useful for me. You might be right about there being no way to change the netrw behaviour. I'd be more certain of that, however, if I knew what was behind the difference in behaviour.

    – user36800
    Jan 10 at 19:19



















  • For me, both ls and netrw sort like in your first output. ASCII + (decimal 43) comes before ASCII . (decimal 46), so this looks fine to me. I don't think there's anything wrong with netrw, nor that you can influence that particular behavior there.

    – Ingo Karkat
    Jan 9 at 10:31











  • Hope I wasn't implying that netrw was wrong. The different sort behaviours were just an observation, with the second one being more useful for me. You might be right about there being no way to change the netrw behaviour. I'd be more certain of that, however, if I knew what was behind the difference in behaviour.

    – user36800
    Jan 10 at 19:19

















For me, both ls and netrw sort like in your first output. ASCII + (decimal 43) comes before ASCII . (decimal 46), so this looks fine to me. I don't think there's anything wrong with netrw, nor that you can influence that particular behavior there.

– Ingo Karkat
Jan 9 at 10:31





For me, both ls and netrw sort like in your first output. ASCII + (decimal 43) comes before ASCII . (decimal 46), so this looks fine to me. I don't think there's anything wrong with netrw, nor that you can influence that particular behavior there.

– Ingo Karkat
Jan 9 at 10:31













Hope I wasn't implying that netrw was wrong. The different sort behaviours were just an observation, with the second one being more useful for me. You might be right about there being no way to change the netrw behaviour. I'd be more certain of that, however, if I knew what was behind the difference in behaviour.

– user36800
Jan 10 at 19:19





Hope I wasn't implying that netrw was wrong. The different sort behaviours were just an observation, with the second one being more useful for me. You might be right about there being no way to change the netrw behaviour. I'd be more certain of that, however, if I knew what was behind the difference in behaviour.

– user36800
Jan 10 at 19:19












1 Answer
1






active

oldest

votes


















0














This can be done. Like open say the directory which contains these files in vim. Then:



Use the r key to set Reverse sorting order.

Then press the s key to sort using a particular style : by name, time or file size.



Hope this helps you somehow mate.



EDIT : If you want to persist say the reverse order and the particular style all the time, then add these to your vim config file :



let g:netrw_sort_by="time"                 "this chooses the style of sorting  
let g:netrw_sort_direction="reverse" "this persists reverse sorting





share|improve this answer


























  • I'm sorry, but I don't think I was explicit enough in my question. I've added a paragraph explaining that both schemes sort by name in ascending order, but the punctuations seem to be treated differently.

    – user36800
    Jan 4 at 5:02














Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54030524%2fmodify-file-sort-by-name-in-vim-netrw-plugin-old-version-in-cygwin%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














This can be done. Like open say the directory which contains these files in vim. Then:



Use the r key to set Reverse sorting order.

Then press the s key to sort using a particular style : by name, time or file size.



Hope this helps you somehow mate.



EDIT : If you want to persist say the reverse order and the particular style all the time, then add these to your vim config file :



let g:netrw_sort_by="time"                 "this chooses the style of sorting  
let g:netrw_sort_direction="reverse" "this persists reverse sorting





share|improve this answer


























  • I'm sorry, but I don't think I was explicit enough in my question. I've added a paragraph explaining that both schemes sort by name in ascending order, but the punctuations seem to be treated differently.

    – user36800
    Jan 4 at 5:02


















0














This can be done. Like open say the directory which contains these files in vim. Then:



Use the r key to set Reverse sorting order.

Then press the s key to sort using a particular style : by name, time or file size.



Hope this helps you somehow mate.



EDIT : If you want to persist say the reverse order and the particular style all the time, then add these to your vim config file :



let g:netrw_sort_by="time"                 "this chooses the style of sorting  
let g:netrw_sort_direction="reverse" "this persists reverse sorting





share|improve this answer


























  • I'm sorry, but I don't think I was explicit enough in my question. I've added a paragraph explaining that both schemes sort by name in ascending order, but the punctuations seem to be treated differently.

    – user36800
    Jan 4 at 5:02
















0












0








0







This can be done. Like open say the directory which contains these files in vim. Then:



Use the r key to set Reverse sorting order.

Then press the s key to sort using a particular style : by name, time or file size.



Hope this helps you somehow mate.



EDIT : If you want to persist say the reverse order and the particular style all the time, then add these to your vim config file :



let g:netrw_sort_by="time"                 "this chooses the style of sorting  
let g:netrw_sort_direction="reverse" "this persists reverse sorting





share|improve this answer















This can be done. Like open say the directory which contains these files in vim. Then:



Use the r key to set Reverse sorting order.

Then press the s key to sort using a particular style : by name, time or file size.



Hope this helps you somehow mate.



EDIT : If you want to persist say the reverse order and the particular style all the time, then add these to your vim config file :



let g:netrw_sort_by="time"                 "this chooses the style of sorting  
let g:netrw_sort_direction="reverse" "this persists reverse sorting






share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 4 at 2:15

























answered Jan 4 at 2:08









YedhinYedhin

61819




61819













  • I'm sorry, but I don't think I was explicit enough in my question. I've added a paragraph explaining that both schemes sort by name in ascending order, but the punctuations seem to be treated differently.

    – user36800
    Jan 4 at 5:02





















  • I'm sorry, but I don't think I was explicit enough in my question. I've added a paragraph explaining that both schemes sort by name in ascending order, but the punctuations seem to be treated differently.

    – user36800
    Jan 4 at 5:02



















I'm sorry, but I don't think I was explicit enough in my question. I've added a paragraph explaining that both schemes sort by name in ascending order, but the punctuations seem to be treated differently.

– user36800
Jan 4 at 5:02







I'm sorry, but I don't think I was explicit enough in my question. I've added a paragraph explaining that both schemes sort by name in ascending order, but the punctuations seem to be treated differently.

– user36800
Jan 4 at 5:02






















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54030524%2fmodify-file-sort-by-name-in-vim-netrw-plugin-old-version-in-cygwin%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Angular Downloading a file using contenturl with Basic Authentication

Monofisismo

Olmecas