Philip Wiki

Персональный wiki-сайт

Инструменты пользователя

Инструменты сайта


Action disabled: source
hw:cisco:npp

Шаблон для Notepad++

Так как приходиться периодически работать с синтаксисом ios cisco в этом замечательном блокноте, немного переделал уже готовую схему подсветки.

Чтобы добавить эту схему, откройте меню ВидПользовательское определение языка СинтаксисыЗадать свой синтаксис…Импортировать и укажите на данный файл.

Как ещё один хинт: сохраняйте конфиги с расширением *.ios, так и вам будет понятнее, и notepadpp будет автоматом определять синтаксис подсветки.

Данный шаблон я обычно делаю в актуальных версиях блокнота, так что в случае проблем с импортом, первое, что вам необходимо сделать – проверить свежесть ПО.

В планах:

[philip]Полноценное блочное отображение1)

Список изменений:

  • Определение IP-адреса и маски сети;
  • Оператор descriptions определяется как комментарий;
  • Возможность сворачивания блоков с данными о сертификатах и интерфейсах (в процессе, т.к. пока работает не так, как надо ;-) ).

Предыдущие изменения:

  * Немного переделал способ отображения комментариев;
  * "Прокачал" отображение списков доступа;
  * Кажется что-то поковырял в стилях... уже не помню. ;-)

Если вдруг что-то измените в лучшую сторону (как это сделать), поделитесь со мной (форма комментариев ниже)!

userDefineLang.xml
<NotepadPlus>
    <UserLang name="Cisco_IOS" ext="ios" udlVersion="2.1">
        <Settings>
            <Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
            <Prefix Keywords1="no" Keywords2="no" Keywords3="yes" Keywords4="no" Keywords5="yes" Keywords6="no" Keywords7="no" Keywords8="no" />
        </Settings>
        <KeywordLists>
            <Keywords name="Comments">00! 00description 01 02 03^ 04^</Keywords>
            <Keywords name="Numbers, prefix1"></Keywords>
            <Keywords name="Numbers, prefix2"></Keywords>
            <Keywords name="Numbers, extras1"></Keywords>
            <Keywords name="Numbers, extras2"></Keywords>
            <Keywords name="Numbers, suffix1"></Keywords>
            <Keywords name="Numbers, suffix2"></Keywords>
            <Keywords name="Numbers, range"></Keywords>
            <Keywords name="Operators1"></Keywords>
            <Keywords name="Operators2"></Keywords>
            <Keywords name="Folders in code1, open">boot-start-marker </Keywords>
            <Keywords name="Folders in code1, middle">interface</Keywords>
            <Keywords name="Folders in code1, close">boot-end-marker</Keywords>
            <Keywords name="Folders in code2, open"></Keywords>
            <Keywords name="Folders in code2, middle">certificate</Keywords>
            <Keywords name="Folders in code2, close">quit</Keywords>
            <Keywords name="Folders in comment, open"></Keywords>
            <Keywords name="Folders in comment, middle"></Keywords>
            <Keywords name="Folders in comment, close"></Keywords>
            <Keywords name="Keywords1">version access-enable access-template archive attach beep calendar cd clear clock cns configure connect copy crypto cts debug delete diagnostic dir disable disconnect dot1x enable eou erase ethernet event exit format fsck help hw-module if-mgr ip issu lock login logout mkdir monitor more mrinfo mstat mtrace name-connection ping platform pwd rcommand redundancy reload remote rename renew rep service hostname boot system flash bootflash username aaa timezone summer-time subnet-zero routing domain-list name-server vrf cluster run vmps server power redundancy-mode redundant spanning-tree mode extend vlan rcmd rsh-enable remote-host description switchport access logging address route-cache default-gateway http access-class secure-server snmp-server engineID community location contact host banner motd line con vty exec-timeout stopbits password ntp clock-period end secret speed duplex link-status portfast auto forwarding telnet source-interface internal allocation policy ascending ftp passive traps tty local pad timestamps datetime localtime show-timezone password-encryption compress-config udp-small-servers tcp-small-servers new-model MESZ recurring mgmtVrf pvst system-id rpr upgrade fpd counters max age multicast-routing multicast cache-headers sap cache-timeout mls flow ipv6 acl tcam share-global cef error action freeze sso main-cpu auto-sync running-config standard optimize bpdu transmission module clear-config provision first-insert publish subscribe fabric buffer-reserve queue wism service-vlan controller allowed-vlan native-vlan access-log ratelimit bandwidth mtu cdp source destination tunnel listen access-group in out accounting output-packets pim sparse-dense-mode trunk encapsulation allowed native nonegotiate snmp trap qos trust cos channel-group on helper-address proxy-arp directed-broadcast igmp query-interval redirects router ospf router-id log-adjacency-changes redistribute static metric subnets tag bgp passive-interface default network area default-information originate log-neighbor-changes neighbor remote-as address-family ipv4 activate soft-reconfiguration inbound distribute-list auto-summary synchronization exit-address-family classless route path access-list remark history debugging facility control-plane dial-peer cor custom domain list tftp ssh isdn switch-type basic-net3 tcp adjust-mss pppoe pppoe-client dial-pool-number negotiated ppp mroute-cache dialer pool dialer-group authentication pap callin sent-username forward-protocol udp rcapi sntp audit po max-events buffered fair-queue hdlc dialer-list protocol aux slb purge global netflow rapid-pvst priority bootup level minimal timer class-map match-all match policy-map polmap-shape48 shape48 class shape peak ingress cost trunk-status status edge channel-protocol lacp active device cisco-phone full broadcast-address ttl-threshold</Keywords>
            <Keywords name="Keywords2">interface permit</Keywords>
            <Keywords name="Keywords3">Ethernet FastEthernet GigabitEthernet TenGigabitEthernet Vlan Loopback Tunnel Dialer BRI Serial Null0 Virtual-Template</Keywords>
            <Keywords name="Keywords4">no shutdown frei disabled deny dynamic any</Keywords>
            <Keywords name="Keywords5">10. 192. 128. 0. 255.</Keywords>
            <Keywords name="Keywords6"></Keywords>
            <Keywords name="Keywords7"></Keywords>
            <Keywords name="Keywords8"></Keywords>
            <Keywords name="Delimiters">00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
        </KeywordLists>
        <Styles>
            <WordsStyle name="DEFAULT" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="COMMENTS" fgColor="8080FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="LINE COMMENTS" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="NUMBERS" fgColor="FF8040" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS2" fgColor="0080FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS3" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS4" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS5" fgColor="FF8040" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="OPERATORS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
            <WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
        </Styles>
    </UserLang>
</NotepadPlus>

1)
если кто-то знает, как сделать отображение блоков, например интерефейсов, то вэлкам в комментарии… мне пока лень, да и нет времени доки читать

Обсуждение

араб, 14.06.2018 14:45

Мне лично (для моих конфигов) вот так больше подошло.

араб, 14.06.2018 14:46

<NotepadPlus>

  <UserLang name="Cisco" ext="ios" udlVersion="2.2">
      <Settings>
          <Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
          <Prefix Keywords1="yes" Keywords2="no" Keywords3="yes" Keywords4="no" Keywords5="yes" Keywords6="no" Keywords7="no" Keywords8="no" />
      </Settings>
      <KeywordLists>
          <Keywords name="Comments">00! 00description 01 02 03 04</Keywords>
          <Keywords name="Numbers, prefix1"></Keywords>
          <Keywords name="Numbers, prefix2"></Keywords>
          <Keywords name="Numbers, extras1"></Keywords>
          <Keywords name="Numbers, extras2"></Keywords>
          <Keywords name="Numbers, suffix1"></Keywords>
          <Keywords name="Numbers, suffix2"></Keywords>
          <Keywords name="Numbers, range"></Keywords>
          <Keywords name="Operators1"></Keywords>
          <Keywords name="Operators2"></Keywords>
          <Keywords name="Folders in code1, open">boot-start-marker</Keywords>
          <Keywords name="Folders in code1, middle">interface</Keywords>
          <Keywords name="Folders in code1, close">boot-end-marker</Keywords>
          <Keywords name="Folders in code2, open"></Keywords>
          <Keywords name="Folders in code2, middle">certificate</Keywords>
          <Keywords name="Folders in code2, close">quit</Keywords>
          <Keywords name="Folders in comment, open"></Keywords>
          <Keywords name="Folders in comment, middle"></Keywords>
          <Keywords name="Folders in comment, close"></Keywords>
          <Keywords name="Keywords1">version access-enable access-template archive attach beep calendar cd clear clock cns configure connect copy crypto cts debug delete diagnostic dir disable disconnect dot1x enable eou erase ethernet event exit format fsck help hw-module if-mgr ip issu lock login logout mkdir monitor more mrinfo mstat mtrace name-connection ping platform pwd rcommand redundancy reload remote rename renew rep service hostname boot system flash bootflash username aaa timezone summer-time subnet-zero routing domain-list name-server vrf cluster run vmps server power redundancy-mode redundant spanning-tree mode extend vlan rcmd rsh-enable remote-host description switchport access logging address route-cache default-gateway http access-class secure-server snmp-server engineID community location contact host banner motd line con vty exec-timeout stopbits password ntp clock-period end secret speed duplex link-status portfast auto forwarding telnet source-interface internal allocation policy ascending ftp passive traps tty local pad timestamps datetime localtime show-timezone password-encryption compress-config udp-small-servers tcp-small-servers new-model MESZ recurring mgmtVrf pvst system-id rpr upgrade fpd counters max age multicast-routing multicast cache-headers sap cache-timeout mls flow ipv6 acl tcam share-global cef error action freeze sso main-cpu auto-sync running-config standard optimize bpdu transmission module clear-config provision first-insert publish subscribe fabric buffer-reserve queue wism service-vlan controller allowed-vlan native-vlan access-log ratelimit bandwidth mtu cdp source destination tunnel listen access-group in out accounting output-packets pim sparse-dense-mode trunk encapsulation allowed native nonegotiate snmp trap qos trust cos channel-group on helper-address proxy-arp directed-broadcast igmp query-interval redirects router ospf router-id log-adjacency-changes redistribute static metric subnets tag bgp passive-interface default network area default-information originate log-neighbor-changes neighbor remote-as address-family ipv4 activate soft-reconfiguration inbound distribute-list auto-summary synchronization exit-address-family classless route path access-list remark history debugging facility control-plane dial-peer cor custom domain list tftp ssh isdn switch-type basic-net3 tcp adjust-mss pppoe pppoe-client dial-pool-number negotiated ppp mroute-cache dialer pool dialer-group authentication pap callin sent-username forward-protocol udp rcapi sntp audit po max-events buffered fair-queue hdlc dialer-list protocol aux slb purge global netflow rapid-pvst priority bootup level minimal timer class-map match-all match policy-map polmap-shape48 shape48 class shape peak ingress cost trunk-status status edge channel-protocol lacp active device cisco-phone full broadcast-address ttl-threshold keyring source-interface</Keywords>
          <Keywords name="Keywords2">interface permit</Keywords>
          <Keywords name="Keywords3">Ethernet FastEthernet GigabitEthernet TenGigabitEthernet Vlan Loopback Tunnel Dialer BRI Serial Null0 Virtual-Template</Keywords>
          <Keywords name="Keywords4">no shutdown frei disabled deny dynamic any</Keywords>
          <Keywords name="Keywords5">10. 192. 128. 0. 255. 80. 194. 193. 82. 212. 195. 77. 188. 213. 81. 222. 79. 163.</Keywords>
          <Keywords name="Keywords6"></Keywords>
          <Keywords name="Keywords7">object-group</Keywords>
          <Keywords name="Keywords8"></Keywords>
          <Keywords name="Delimiters">00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
      </KeywordLists>
      <Styles>
          <WordsStyle name="DEFAULT" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
          <WordsStyle name="COMMENTS" fgColor="8080FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
          <WordsStyle name="LINE COMMENTS" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
          <WordsStyle name="NUMBERS" fgColor="FF8040" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
          <WordsStyle name="KEYWORDS1" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
          <WordsStyle name="KEYWORDS2" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
          <WordsStyle name="KEYWORDS3" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
          <WordsStyle name="KEYWORDS4" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
          <WordsStyle name="KEYWORDS5" fgColor="FF8040" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
          <WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
          <WordsStyle name="KEYWORDS7" fgColor="DD6F00" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="11" nesting="0" />
          <WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
          <WordsStyle name="OPERATORS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
          <WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
          <WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
          <WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
          <WordsStyle name="DELIMITERS1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
          <WordsStyle name="DELIMITERS2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
          <WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
          <WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
          <WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
          <WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
          <WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
          <WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
      </Styles>
  </UserLang>

</NotepadPlus> Полужирный

Только авторизованные участники могут оставлять комментарии.
hw/cisco/npp.txt · Последнее изменение: 21.07.2014 14:31 — philip

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki