![]() This is really just one of many issues you will run into when you try to use a text editor as a pager. ![]() You can use other features of vim, such as concealment and syntax highlighting to hide the sequences and use them for setting colors of the text, however, it will always handle only a subset of the terminal sequences, and will probably not work on some terminals. It needs to display them in some way, so you can actually edit them. Vim, being an editor rather than a pager, does not simply pass raw control characters to the terminal. The terminal will interprets the escape sequences and changes the attributes of the text (color, bold, underline. Less does not actually understand the terminal escape sequences, since these are largely terminal dependent, but less can recognize (a subset of) these, and will know to pass them through to the terminal, if you use the -r (or -R) option. You will have to experiment with it.Ī long answer: The best you can hope for is a partial non-portable solution. I am not sure if you can simply always load it, or if it will conflict with other syntax files. The problem with using this in a pager is that you will have to make vim recognize when to use this. It will conceal the actual ANSI escape sequences in your file, and use syntax highlighting to color the text appropriately. ![]() Not sure if this setting is compatible for all remote Linux/Unix servers. A short one: you want to use the vim script AnsiEsc.vim. The problem with using this in a pager is that you will have to make vim recognize when to use this. tPtyType('ansi') before connect can remove the ansi colors so that the output is acceptable in Windows. A short one: you want to use the vim script AnsiEsc.vim. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |