ansi-escape

vim :AnsiEsc - how to have them on by default?

帅比萌擦擦* 提交于 2021-02-08 06:38:34
问题 I have log files (let say with the extension *.smt2) with colored log entries, where colors are defined by ansi escape codes. I installed the vim plugin based on AnsiEsc.vim. Now when I open my vim editor I need to type :AnsiEsc. How can I add :AnsiEsc to my .vimrc to be in my default view? 回答1: Your autocmd will only work for the first file that is passed as a command-line argument, as the :AnsiEsc command only applies to the current buffer. It will miss files opened via :edit or :split .

ANSI questions: “\x1B[?25h” and “\x1BE”

独自空忆成欢 提交于 2021-02-06 19:56:56
问题 What does "\x1B[?25h" do? How is "\x1BE" different from "\n" ? According to http://ascii-table.com/ansi-escape-sequences-vt-100.php it " moves to next line "? Seems like that's what "\n" does? I tried echo "xxx\nxxx\n" and echo "xxx\x1BExxx\n" in PHP and they both output the same thing. Any ideas? Thanks! 回答1: These are ANSI escape sequences (also known as VT100 codes) are an early standardisation of control codes pre-dating ASCII. The escape sequence \x1BE , or Esc + E , is NEL or "Next line

ANSI escape code wont work on python interpreter

↘锁芯ラ 提交于 2021-01-29 21:27:48
问题 ANSI code wont work on my python interpreter I wanted to color some of my prints on the project. I looked up on how to color printed characters and found the ANSI escape codes, so i tried it up on the interpreter, but it wont work. for example: print("\033[32m Hello") it Gives me <-[32m Hello (an arrow left sign). how do i make it work? can it work on python's interpreter? if not, where should i use it? 回答1: You are best off installing other packages to help generate the ANSI sequences, iirc

ANSI escape code wont work on python interpreter

拥有回忆 提交于 2021-01-29 19:39:21
问题 ANSI code wont work on my python interpreter I wanted to color some of my prints on the project. I looked up on how to color printed characters and found the ANSI escape codes, so i tried it up on the interpreter, but it wont work. for example: print("\033[32m Hello") it Gives me <-[32m Hello (an arrow left sign). how do i make it work? can it work on python's interpreter? if not, where should i use it? 回答1: You are best off installing other packages to help generate the ANSI sequences, iirc

How to identify the Terminal Emulator being used?

十年热恋 提交于 2021-01-28 04:42:12
问题 I'm developing a library that needs to identify the running terminal emulator in order to output emulator-specific escape code sequences. For example, iTerm 2 uses the following proprietary sequence: ESC ] 50 ; CurrentDir=/path/to/dir BEL While ConEmu uses the following proprietary sequence: ESC ] 9 ; 9 ; C:\path\to\dir BEL Now, I need to query the terminal (either using environment variables or using an escape sequence) in order to output the correct terminal-specific codes. How can I

What this character sequence “\033[H\033[J” does in C? [duplicate]

喜夏-厌秋 提交于 2021-01-27 11:33:24
问题 This question already has answers here : What does printf(“\033c” ) mean? (3 answers) Closed 1 year ago . I have gone through the below strange sequence of characters in some random website. When compiled and executed, this Sequence cleared all previous content in terminal. Does it clear buffer in output stream or does it clear only tty buffers?. int main() { printf("\033[H\033[J"); return 0; } 回答1: These are ANSI escape codes. \033 stands for ESC (ANSI value 27). ESC [ is a kind of escape

What this character sequence “\033[H\033[J” does in C? [duplicate]

天涯浪子 提交于 2021-01-27 11:32:29
问题 This question already has answers here : What does printf(“\033c” ) mean? (3 answers) Closed 1 year ago . I have gone through the below strange sequence of characters in some random website. When compiled and executed, this Sequence cleared all previous content in terminal. Does it clear buffer in output stream or does it clear only tty buffers?. int main() { printf("\033[H\033[J"); return 0; } 回答1: These are ANSI escape codes. \033 stands for ESC (ANSI value 27). ESC [ is a kind of escape

What this character sequence “\033[H\033[J” does in C? [duplicate]

爱⌒轻易说出口 提交于 2021-01-27 11:32:23
问题 This question already has answers here : What does printf(“\033c” ) mean? (3 answers) Closed 1 year ago . I have gone through the below strange sequence of characters in some random website. When compiled and executed, this Sequence cleared all previous content in terminal. Does it clear buffer in output stream or does it clear only tty buffers?. int main() { printf("\033[H\033[J"); return 0; } 回答1: These are ANSI escape codes. \033 stands for ESC (ANSI value 27). ESC [ is a kind of escape

How to clear terminal/screen in scala

心已入冬 提交于 2020-11-29 21:21:11
问题 I need to clear console screen in Scala I've tried standard ANSI Clear screen which was suggested as "Terminal control/Clear the screen" by rosettacode.org here object Cls extends App {print("\033[2J")} I got following error: Error:(8, 14) octal escape literals are unsupported: use \u001b instead println("\033[2J") 回答1: I found solution for my question and I'll share it here for others, apparently from Scala 2.10 Octal litherals are deprecated see here. In question above "\033[2J" didn't work

How to clear terminal/screen in scala

匆匆过客 提交于 2020-11-29 21:16:57
问题 I need to clear console screen in Scala I've tried standard ANSI Clear screen which was suggested as "Terminal control/Clear the screen" by rosettacode.org here object Cls extends App {print("\033[2J")} I got following error: Error:(8, 14) octal escape literals are unsupported: use \u001b instead println("\033[2J") 回答1: I found solution for my question and I'll share it here for others, apparently from Scala 2.10 Octal litherals are deprecated see here. In question above "\033[2J" didn't work