2015-04-18 12:19 GMT+03:00 Bidit Mazumder <bidit.mazum...@gmail.com>: > On Thursday, April 16, 2015 at 11:31:12 PM UTC+3, Christian Brabandt wrote: >> Hi Bidit! >> >> On Do, 16 Apr 2015, Bidit Mazumder wrote: >> >> > First, I would like to thank Bram Moolenaar for making Vim, and Björn >> > Winckler for the MacVim port. >> > >> > The "ce" and "cw" bug should be addressed (see >> > https://groups.google.com/forum/#!topic/vim_use/UWLISFkZAlo) >> >> That is not a bug and has been explained several times (even in your >> link) >> >> You can probably map it away if you don't like this. A quick google >> search shows, there is even a plugin to change that behaviour: >> https://github.com/ap/vim-you-keep-using-that-word >> >> > Sublime Text also has a unique feature that allows you to navigate >> > through the entire document from a pane on the right (see pic). This >> > would be a great feature to have in Vim—Especially for those who can't >> > stand folding. Sublime Text also shows indentation as vertical lines >> > (see pic)—This is a good feature; it will blend in perfectly with Vim. >> >> There are plugins that do that: >> https://github.com/severin-lemaignan/vim-minimap >> https://github.com/koron/minimap-vim >> >> > As far as I know, in Vim, it is not possible to display "\r" and "\n" >> > as (different) special characters. This would be a nice feature to >> > have for documents that contain both 'dos', 'unix' and 'classic mac' >> > line breaks. >> >> Concealing should help with that. >> >> > Finally, there should be a simple way to know if the Caps-Lock or >> > Shift key is pressed (like changing the cursor color, or the color of >> > the cursor-line. Like "hi ShiftModeCursor" or "hi >> > ShiftModeCursorLine". >> >> If there is a utility that queries the status of the Caps-Lock key, you >> can probably make use of it in the statusline. Don't know, if such a >> tool exists. >> >> Best, >> Christian >> -- >> Willst du friedlich leben? Verkehre mit den Menschen, lebe aber >> allein, unternimm nichts und bedauere gar nichts. >> -- Iwan S. Turgenjew (Gedichte in Prosa) > > Hi Christian, > > Thanks for the links to the plugins. > > I tried Conceal to show 'dos' line breaks, but it doesn't work. Here is what > I tried: > set conceallevel=2 concealcursor=nciv > syntax match CRLF "\r\n" conceal cchar=→
This code does not what you think. `\r` matches `<C-m>` *only* unless it was transformed into a line break when reading file. `\n` does *not* match `<LF>`, it matches *line break*, whatever it is. This means that the above code *will* conceal `<CR>` at the end of line, but only if you opened a file with CRLF linebreaks as a file with LF linebreaks. And you can’t possibly conceal the line break. I guess what you need is something set list let &listchars='tab: ' autocmd BufReadPost * :if &fileformat is# 'dos' | setlocal listchars+=eol:→ | endif except that `setlocal listchars` is not doing what you expect (listchars is a global option). > hi clear Conceal > hi Conceal > > Regarding the "ce" issue: I've read the arguments about "ce" in that links > that Justin provided, but I'm still not convinced that the behavior of "ce" > is a feature. I have already got used to this, but I think it would be better if there was no such inconsistency: I now sometimes try to use `dw` as `de` because of `cw`. And I don’t have a universal and just as short replacement for `cw`. > > Example: > > Th[i]s is a web page. (the cursor is on "i") > "ce" or "cw" > Th| is a web page. (Insert mode is enabled. "|" is the cursor) > > In the above case, "ce" and "cw" both have the same effect. > --- > > This is [a] web page. > "ce" > This is | page. > > This is [a] web page. > "cw" > This is | web page. > > In the above case, "ce" deletes two words; and "cw" deletes one word. > --- > > This is [a] web page. > "de" > This is [] page. > > This is [a] web page. > "dw" > This is [w]eb page. > > In the above case, both "de" and "dw" perform as expected. > --- > > > "d" and "c" are both operators, pressing them in Normal mode enters > Operator-Pending mode. > > In essence, it starts a finite-state machine and waits for a motion. > The finite-state machine for "ce" and "de" should be the same, the only > difference would be the final state. > > "de"'s final state is Normal mode and "ce"'s final state is Insert mode. > > -- > -- > You received this message from the "vim_dev" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_dev+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.