AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / unix / Perguntas / 435696
Accepted
PatrickSteiner
PatrickSteiner
Asked: 2018-04-06 00:47:34 +0800 CST2018-04-06 00:47:34 +0800 CST 2018-04-06 00:47:34 +0800 CST

Como ativar o realce de sintaxe na visualização do ranger?

  • 772

Eu vi algumas capturas de tela em que o ranger usa realce de sintaxe em sua janela de visualização. Então eu queria saber como habilitar esse recurso e descobri que preciso do scope.sharquivo no diretório /home/user/.config/ranger/scop.sh, que será gerado com o comando $ ranger --copy-config=scope. Depois de gerá-lo, no entanto, a janela de visualização desaparece completamente, embora eu tenha inserido set use_preview_script trueno arquivo rc.config.

P: Alguém sabe como ativar o realce de sintaxe (especialmente para C/C++) na janela de visualização do ranger?

ranger syntax-highlighting
  • 2 2 respostas
  • 8057 Views

2 respostas

  • Voted
  1. Best Answer
    thiagowfx
    2018-06-30T13:50:08+08:002018-06-30T13:50:08+08:00
    $ sudo apt install highlight
    

    depois reabra ranger.

    • 16
  2. David Soroko
    2020-01-14T11:34:23+08:002020-01-14T11:34:23+08:00

    Ranger suporta highlight, veja http://www.andre-simon.de/doku/highlight/en/highlight.php para detalhes

    Instale no macOS executando brew install highlight. A lista de temas disponíveis pode ser consultada em: highlight/<highlight_version>/share/highlight/themesex:

    /usr/local/Cellar/highlight/3.54/share/highlight/themes$ ls 
    
    base16             clarity.theme              easter.theme             edit-vim.theme    molokai.theme       relaxedgreen.theme
    acid.theme         dante.theme                edit-anjuta.theme        edit-xcode.theme  moria.theme         rootwater.theme
    aiseered.theme     darkblue.theme             edit-bbedit.theme        ekvoli.theme      navajo-night.theme  seashell.theme
    andes.theme        darkbone.theme             edit-eclipse.theme       fine_blue.theme   navy.theme          solarized-dark.theme
    anotherdark.theme  darkness.theme             edit-emacs.theme         freya.theme       neon.theme          solarized-light.theme
    autumn.theme       darkplus.theme             edit-fasm.theme          fruit.theme       night.theme         sourceforge.theme
    baycomb.theme      darkslategray.theme        edit-flashdevelop.theme  github.theme      nightshimmer.theme  tabula.theme
    bclear.theme       darkspectrum.theme         edit-gedit.theme         golden.theme      nuvola.theme        tcsoft.theme
    biogoo.theme       denim.theme                edit-godot.theme         greenlcd.theme    olive.theme         the.theme
    bipolar.theme      duotone-dark-earth.theme   edit-jedit.theme         kellys.theme      orion.theme         vampire.theme
    blacknblue.theme   duotone-dark-forest.theme  edit-kwrite.theme        leo.theme         oxygenated.theme    whitengrey.theme
    bluegreen.theme    duotone-dark-sea.theme     edit-matlab.theme        lucretia.theme    pablo.theme         xoria256.theme
    breeze.theme       duotone-dark-sky.theme     edit-msvs2008.theme      manxome.theme     peaksea.theme       zellner.theme
    bright.theme       duotone-dark-space.theme   edit-nedit.theme         maroloccio.theme  print.theme         zenburn.theme
    camo.theme         dusk.theme                 edit-purebasic.theme     matrix.theme      rand01.theme        zmrok.theme
    candy.theme        earendel.theme             edit-vim-dark.theme      moe.theme         rdark.theme
    

    O Ranger configura o realce em scope.sh. Para usar um tema específico, a HIGHLIGHT_STYLEvariável deve ser definida, por exemplo:export HIGHLIGHT_STYLE=clarity

    • 8

relate perguntas

  • Visualizar arquivos no ranger

  • Ranger não pode abrir arquivos PDF com o Foxitreader

  • O gerenciador de arquivos Ranger não responde ao usar alguns aplicativos

  • Visualizar PDF como imagem no ranger

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Como exportar uma chave privada GPG e uma chave pública para um arquivo

    • 4 respostas
  • Marko Smith

    ssh Não é possível negociar: "nenhuma cifra correspondente encontrada", está rejeitando o cbc

    • 4 respostas
  • Marko Smith

    Como podemos executar um comando armazenado em uma variável?

    • 5 respostas
  • Marko Smith

    Como configurar o systemd-resolved e o systemd-networkd para usar o servidor DNS local para resolver domínios locais e o servidor DNS remoto para domínios remotos?

    • 3 respostas
  • Marko Smith

    Como descarregar o módulo do kernel 'nvidia-drm'?

    • 13 respostas
  • Marko Smith

    apt-get update error no Kali Linux após a atualização do dist [duplicado]

    • 2 respostas
  • Marko Smith

    Como ver as últimas linhas x do log de serviço systemctl

    • 5 respostas
  • Marko Smith

    Nano - pule para o final do arquivo

    • 8 respostas
  • Marko Smith

    erro grub: você precisa carregar o kernel primeiro

    • 4 respostas
  • Marko Smith

    Como baixar o pacote não instalá-lo com o comando apt-get?

    • 7 respostas
  • Martin Hope
    rocky Como exportar uma chave privada GPG e uma chave pública para um arquivo 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Wong Jia Hau ssh-add retorna com: "Erro ao conectar ao agente: nenhum arquivo ou diretório" 2018-08-24 23:28:13 +0800 CST
  • Martin Hope
    Evan Carroll status systemctl mostra: "Estado: degradado" 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim Como podemos executar um comando armazenado em uma variável? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S Por que /dev/null é um arquivo? Por que sua função não é implementada como um programa simples? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 Como ver as últimas linhas x do log de serviço systemctl 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - pule para o final do arquivo 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla Por que verdadeiro e falso são tão grandes? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis Substitua a string em um arquivo de texto enorme (70 GB), uma linha 2017-12-30 06:58:33 +0800 CST
  • Martin Hope
    Bagas Sanjaya Por que o Linux usa LF como caractere de nova linha? 2017-12-20 05:48:21 +0800 CST

Hot tag

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve