| AngelBot has one goal. External Services. It does that really well. Want to interface with Anilist on Discord? AngelBot is your bot. |
| Want to use it with other bots? That's okay too. We can dig it. The command prefix for AngelBot can be anything. AngelBot is robo friendly. |
| AngelBot has per guild settings. Additionally, each command set can be locked to specific channels in your guild if you like. |
| AngelBot has a flexible configuration system. You can control channel locks through AngelBot or by simply restricting what channels AngelBot can hear. |
AngelBot has one goal. External Services. It does that really well. Want to interface with Anilist on Discord? AngelBot is your bot.
Want to use it with other bots? That's okay too. We can dig it. The command prefix for AngelBot can be anything. AngelBot is robo friendly.
AngelBot has per guild settings. Additionally, each command set can be locked to specific channels in your guild if you like.
AngelBot has a flexible configuration system. You can control channel locks through AngelBot or by simply restricting what channels AngelBot can hear.
| Command |
Purpose |
| @AngelBot help |
Get all the documentation available on the RTFD in discord |
| @AngelBot info |
Get some information on AngelBot including links to documentation and this website |
| Command |
Purpose |
| auser |
Get the AniList profile of yourself or any other user! |
| aanime |
Pull the details of any Anime! |
| amanga |
But what if I like Manga? Well pull those details too! |
| acurrent |
Get a list of the top 10 most popular currently airing anime. |
| And More... |
New Commands are added often. |
| Command |
Purpose |
| search |
Looking for the name of that item that you only know that one word to? No worries. |
| Categorical Commands |
Want to know where to start the quest Original Sins? How to make Yew Lumber? Yeah we got you. |
| Materials and Gathering |
But wait, I need Yew Logs for that. Don't worry, We can tell you where those are too. |
| What about... |
We got you bro. Anything with information worth parsing has a command. Even status effects. |
| Command |
Purpose |
| XKCD |
Pull current or specific XKCD comic. |
| Command |
Purpose |
| islolup |
Check on the status of League of Legends' servers |
| lolstats |
Check the stats of other summoners |
| lolrecent |
Check up on what other summoners have been doing recently |
| lolfree |
Keep tabs on the free rotation even if you can't reach the LoL website |
| And More... |
Alongside a couple more useful commands in the documentation |
|
AngelBot isn’t endorsed by Riot Games and doesn’t reflect the views or opinions of Riot Games or anyone officially involved in producing or managing League of Legends. League of Legends and Riot Games are trademarks or registered trademarks of Riot Games, Inc. League of Legends © Riot Games, Inc.
|
| Servers |
Users |
Uptime |
Commands |
Commands a Second |
| {{servers}} |
{{users}} |
Loading... |
{{commands}} |
{{cmdssec}} |


[gecode-users] braking symmetries in backtracking
Mikael Zayenz Lagerkvist
zayenz at gmail.com
Tue Nov 10 12:31:54 CET 2009
Hi,
This sounds like the situation in Steel Mill Slab design. There, any slab
that has not had anything allocated to it yet is considered symmetrical.
That is, there is an interchangeable values symmetry on the identities of
the slabs. There are several ways to handle this kind of symmetry. Which
approach is the best depends on your problem, and on the heuristic you use
for search.
The example in Gecode for Steel Mill uses the technique from "The Steel Mill
Slab Design Problem Revisited", Van Hentenryck and Michel, CPAIOR 2008 to
break the symmetry in the Brancher. Another possibility is to add
constraints that break the symmetry explicitly. For an example on how to do
this, see for example "Breaking Value Symmetry", Walsh, AAAI-2008.
With regards to your proposed solution, you would need to record all the
information that you need to redo the decision in the Choice object (e.g.,
the set of symmetrical bins). When executing the commit-operation, you are
not guaranteed to have an equivalent state every time.
Hope this helps,
Mikael
On Tue, Nov 10, 2009 at 12:05 PM, Alberto Delgado <trosky99 at gmail.com>wrote:
> Hi all,
>
> I have a modeling/implementation question that maybe somebody has
> faced before, or that gecode developers could help me answer. I'm
> trying to implement a symmetry-breaking strategy that works when the
> search engine backtracks. I have a set of items that need to be
> allocated in a set of bins (bin-packing problem) and I branch over the
> items to find for each item a possible bin where it can be allocated.
>
> When it is no possible to allocate an item in a selected bin (the
> search engine backtracks), i'd like to avoid trying to allocate the
> item in bins with the same available capacity as the bin that has just
> been discarded, since i already know it won't be possible. This
> should be as simple as identifying the bins with the same available
> capacity as the bin selected by the branching, and posting rel
> constraints to remove these bins from the domain of the item. I
> thought about doing this in the commit method, and instead of just
> posting one constraint to remove the bin that couldn't allocate the
> item being considered, also remove the bins with the same available
> capacity.
> The problem is that if i follow this approach i think i'll screw up
> recomputation , and that's just if i'm able to get the information i
> need to the commit method.
>
> Do you guys have any suggestions on how to implement this in gecode?
> any hints are welcome.
>
>
> Best,
>
> Alberto
>
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
>
--
Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20091110/82e911a5/attachment.htm>
More information about the gecode-users
mailing list


[1]
Has Viera Link, Very small, Easy to use.; A couple of seconds of load time.
[2]
small footprint; so far, picture quality is no better than my old standard dvd player


The film is based on a short story by Jacek Dukaj under the same title. In 2002 "Cathedral" was awarded the main prize at SIGGRAPH festival ("Best Animated Short"). A year later it received an Oscar nomination in the category "Best Animated Short Film".
SYNOPSIS: Story of a pilgrim who comes to the Cathedral on the border of the known world. He wants to find answers. He finds tranquility.
DIRECTOR: Tomasz Baginski


pgAgent runs 'jobs', each of which consists of steps and schedules. To configure jobs on your server, browse to the server on which the pgAgent database objects were created. A Jobs node will be displayed, under which individual jobs are shown. New jobs may be created, and existing jobs modified in the same way as any other object in pgAdmin.
The properties tab in the main pgAdmin window will display the details of the selected job, and the Statistics tab will show the details of each run of the job.
Job themselves are very simple - the complexity is in the steps and schedules. When configuring a job, we specify the job name, whether or not it is enabled, a job class or category, and optionally the hostname of a specific machine running pgAgent, if this job should only run on that specific server. If left empty (which is normally the case), any server may run the job. This is not normally needed for SQL-only jobs, however any jobs with batch/shell steps may need to be targetted to a specific server. A comment may also be included.
Note: It is not always obvious what value to specify for the Host Agent in order to target a job step to a specific machine. With pgAgent running on the required machines and connected to the scheduler database, the following query may be run to view the hostnames as reported by each agent:
SELECT jagstation FROM pgagent.pga_jobagent
Use the hostname exactly as reported by the query in the Host Agent field.


// SPDX-License-Identifier: MIT
pragma solidity 0.7.5;
contract ERC20br {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
constructor() {
_name = "ERC20br";
_symbol = "2BR";
_totalSupply = 8516000 * (10**18); // 8516m km size of Brazil
_balances[msg.sender] = _totalSupply;
}
function name() public view virtual returns (string memory) {
return _name;
}
function symbol() public view virtual returns (string memory) {
return _symbol;
}
function decimals() public view virtual returns (uint8) {
return 18;
}
function totalSupply() public view virtual returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) public view virtual returns (uint256) {
return _balances[account];
}
function transfer(address recipient, uint256 amount)
public
virtual
returns (bool)
{
require(recipient != address(0), "ERC20: transfer to the zero address");
uint256 senderBalance = _balances[msg.sender];
require(
senderBalance >= amount,
"ERC20: transfer amount exceeds balance"
);
_balances[msg.sender] = senderBalance - amount;
_balances[recipient] += amount;
emit Transfer(msg.sender, recipient, amount);
return true;
}
function allowance(address owner, address spender)
public
view
virtual
returns (uint256)
{
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount)
public
virtual
returns (bool)
{
require(spender != address(0), "ERC20: approve to the zero address");
require(
_balances[msg.sender] >= amount,
"ERC20: approval amount exceeds balance"
);
_allowances[msg.sender][spender] = amount;
emit Approval(msg.sender, spender, amount);
return true;
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual returns (bool) {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
uint256 currentAllowance = _allowances[sender][msg.sender];
require(
currentAllowance >= amount,
"ERC20: transfer amount exceeds allowance"
);
uint256 senderBalance = _balances[sender];
require(
senderBalance >= amount,
"ERC20: transfer amount exceeds balance"
);
_balances[sender] = senderBalance - amount;
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
_allowances[sender][msg.sender] = currentAllowance - amount;
emit Approval(sender, msg.sender, amount);
return true;
}
/*
* It exists only for tests purpose so you can mint tokens to yourself
* and check your balance and transfer to other wallets.
*/
function mint(uint256 amount) public virtual returns (bool) {
require(amount > 0, "ERC20: mint 0 tokens");
uint256 yourBalance = _balances[msg.sender];
_balances[msg.sender] = yourBalance + amount;
emit Transfer(address(0), msg.sender, amount);
return true;
}
}
|


Wikipedia (/ˌwɪkɪˈpiːdiə/ (About this soundlisten) wik-ih-PEE-dee-ə or /ˌwɪki-/ (About this soundlisten) wik-ee-) is a free content, multilingual online encyclopedia written and maintained by a community of volunteer contributors through a model of open collaboration, using a wiki-based editing system. It is the largest and most-read reference work in history,[3] and consistently one of the 15 most popular websites ranked by Alexa; as of 2021, Wikipedia was ranked the 13th most popular site.[3][4] It carries no advertisements and is hosted by the Wikimedia Foundation, an American non-profit organization funded mainly through small donations.[5]


--- layout: post title: Net::SSH::Multi + Rake == Tasty Potential post_id: 59 categories: - tips & tricks date: 2008-04-11 10:08:00.000000000 -06:00 author: Jamis permalink: 2008/4/11/net-ssh-multi-rake-tasty-potential.html summary: > Net::SSH::Multi is announced and demonstrated in connection with custom Rake tasks ---
Last night I released the first preview of Net::SSH::Multi (gem install --source http://gems.jamisbuck.org net-ssh-multi
). Today, let me show you a tasty hint of what you can do with it.
Consider the following Rakefile:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
def remote @remote ||= begin require 'net/ssh/multi' session = Net::SSH::Multi.start session.via 'gateway.host', session.default_user session.group :web => session.use('web1', 'web2') session.group :app => session.use(*(1..8).map { |n| "app%02d" % n }) session.group :db => session.use('db1', :properties => { :primary => true }) session end end namespace :remote do task :hostnames do remote.exec("hostname").wait end task :app_hostnames do remote.with(:app).exec("hostname").wait end task :web_hostnames do remote.with(:web).exec("hostname").wait end end |
You can now do things like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
$ rake remote:hostnames (in /home/jamis) [web1] web1.host [app02] app02.host [app05] app05.host [app03] app03.host [app06] app06.host [app08] app08.host [db1] db1.host [app01] app01.host [web2] web2.host [app04] app04.host [app07] app07.host |
The Net::SSH::Multi library is still experimental, but it is stable and full-featured enough that I seriously considered implementing the next release of Capistrano on top of it. (I’ll probably put that off until cap3, though, due to the magnitude of the change.) If you do something cool with it, let me know!


Press Win + R to open "Run" window.
Type "cmd" and press Enter.
You should see the black command prompt window.
Type getmac /v in the command prompt window and press Enter. It should return you a list of adapters.
Microsoft Windows [版本 10.0.10525] (c) 2015 Microsoft Corporation. All rights reserved. C:\Users\admin>getmac /v 连接名 网络适配器 物理地址 传输名称 =============== =============== =================== ========================================================== 以太网 Intel(R) PRO/10 00-1C-42-XX-XX-XX \Device\Tcpip_{5EB740D5-76B4-46D7-A93B-XXXXXXXXXXXX} C:\Users\admin>_
As highlighted in the figure, find "Ethernet" or "以太网" or "乙太網絡" in the list, and the string under "Physical address" column is your MAC address. Remember it CORRECTLY!
Open terminal.
Type 'ifconfig' and press Enter.
user@computer:~$ ifconfig eth0 Link encap:Ethernet HWaddr 00:1c:42:xx:xx:xx inet addr:<IP_ADDRESS> Bcast:<IP_ADDRESS> Mask:<IP_ADDRESS> inet6 addr: fdb2:2c26:f4e4:0:xxxx:xxxx:xxxx:xxxx/64 Scope:Global inet6 addr: fdb2:2c26:f4e4:0:xxxx:xxxx:xxxx:xxxx/64 Scope:Global inet6 addr: fe80::21c:42ff:fe07:f6f8/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1000 Metric:1 RX packets:100 errors:0 dropped:0 overruns:0 frame:0 TX packets:101 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:9314 (9.3 KB) TX bytes:15671 (15.6 KB) lo Link encap:Local Loopback inet addr:<IP_ADDRESS> Mask:<IP_ADDRESS> inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:100 errors:0 dropped:0 overruns:0 frame:0 TX packets:100 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:24050 (24.0 KB) TX bytes:24050 (24.0 KB) user@computer:~$
As shown in the figure, your ethernet MAC address should be in "eth**" section, and to the right of "HWaddr". Remember it CORRECTLY!
Seems that your Mac device doesn't have an ethernet port, and you need an adapter. Why not buying a Thunderbolt to Gigabit Ethernet Adapter from Apple online store?
Or if you have a new MacBook, you need an Apple USB Ethernet Adapter and a USB-C to USB Adapter, which brings inconvenience. In this case, I suggest you setup Wi-Fi in your room.
Open System Preference
Choose "Internet"
Plug in your Thunderbolt or USB Adapter. After seeing your adapter appears in the list at left, choose your adapter.
Select your Ethernet Adapter from the list at left.
Press "Advanced..." button at right-bottom corner.
Under "Hardware" tab, you are able to see your MAC Address. Remember it CORRECTLY!
Find any Wi-Fi access in CityU (usually common room). Open CityU NCM (https://www6.cityu.edu.hk/ncm/) and login with your CityU Student EID and password.
Choose "Connection in Residence" in left menu.
You should be required to agree their terms. If you have read and agree with it, check the checkbox and continue.
You should see a form at the right.
Please confirm the correctness of your "Residence Location" and "Contact Phone Number".
In "Network Card Address" section, fill in your MAC address after double checking.
| *Network Card Address: | - - - - - |
In "Network Card Ownership" section, choose "Self-Owned".
| *Network Card Ownership: |
In "Outlet ID" section, choose whether your bed is at left or right.
| *Outlet ID: |
In "Machine Type" section, choose "PC".
| *Machine Type: |
In "OS Type" section, you can choose any one of them and it doesn't affect your Internet application. But for convience, I suggest you to choose " WINDOWS XP WINDOWS 7 WINDOWS 8 WINDOWS 10 MAC OS LINUX " which should be your OS type.
For "Version", you can fill anything in it and it doesn't affect your Internet application. For example, "10".
| *OS Type: | Version |
Leave blank for "Remarks".
| Remarks: |
Make sure you filled in all blanks with "*". Submit the form.
You will receive an email indicating that CityU received your application. All you need to do is wait. Normally, it takes no more than few hours to get your network works.
You are supposed to have a network cable. If not, just buy one from homey kitchen.
If you are at the side with telephone, please connect one side of the cable to the telephone. If not, plug one side of the cable in the LAN port on the wall directly.
Connect your USB or Thunderbolt Ethernet Adapter first. Plug the other side of the cable in your adapter.
Plug the other side of the cable in your computer's ethernet port.
Test the connection after few hours.
Should you have any questions, please check troubleshot page.


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object EigenMeat.EigenMaze.ProjectileLauncher
Projectile Launcher object
| Constructor Summary | |
ProjectileLauncher(MobileEntity e,
float speed,
int delay,
int life)
Constructor. |
| Method Summary | |
java.lang.Object |
clone()
Clones this ProjectileLauncher. |
void |
setEntity(MobileEntity e)
Set the entity this launcher is attached to. |
void |
setLifeTime(int life)
Set life. |
void |
setProjectile(java.lang.String projname)
Set the projectile this launcher will fire. |
void |
setShotDelay(int shotDelay)
Set delay between shots. |
void |
setSpeed(float speed)
Set the speed of the bullets |
void |
shoot()
Fires the default Projectile, if any. |
void |
shoot(Projectile proj)
This function will shoot a bullet |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ProjectileLauncher(MobileEntity e, float speed, int delay, int life)
e
- the owner of the launcherspeed
- initial speed of bulletsdelay
- the delay between shotslife
- the life of the bullet| Method Detail |
public void setSpeed(float speed)
speed
- bullet speedpublic void setShotDelay(int shotDelay)
shotDelay
- delay between shotspublic void setLifeTime(int life)
life
- the life of the bulletpublic void setProjectile(java.lang.String projname)
projname
- the softloaded name of the Projectile to be fired.public void setEntity(MobileEntity e)
e
- the entity to attach to.public void shoot(Projectile proj)
public void shoot()
setProjectile(String)
public java.lang.Object clone()
Object.clone()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


{% extends "base.html" %} {% block head %}
Here is a sample of the sort of useful output you can
make using the JSON generated by
create-exam.py
. The text here can easily be
copy-pasta'd into a Word or Google document to be finalized by
a non-programmer friend, doing things like adding page breaks
when appropriate to make a print-ready exam version.
To view the raw JSON generated, navigate to localhost:5000/create-exam/sample?s=1337 where 1337 can be replaced by whatever seed value you want to use.
Had enough? Return to the homepage or Github repository .


Select book(s)
Please input your adress (Contry (if your contry empty Table contry);City; Post address>


Auth Token:
Register Platform 1
Register Platform 2
Register Platform 3
Register Comms 1
Register Comms 2
Load Default
VIP Identity:
Agent id:
VIP Address:
Register Platform
Platform UUID:
Unregister VIP Address
New discovery stuff here!


Like the command buttons, the main page will also display one button for each defined file editor. To edit an existing editor, just click on the Edit file editor link below it. To create a new editor, click on the Create a new file editor link at the botton of the page.


This is a practice quiz. The results are not recorded anywhere and do not affect your grade. The questions on this quiz might not appear in any quiz or test that does count toward your grade.
Instructions: For each question, choose the single best answer. Make you choice by clicking on its button. You can change your answers at any time. (When the quiz is graded, the correct answers will appear in the box after each question.)


---
layout: post
title: links for 2007-02-19
date: 2007-02-19 00:00:00
---
-
"The main difference between SMS and IM messaging is real time delivery, which 3G networks are more than capable of handling now with increased total bandwidth and lower latency."
-
-
-
Strangely hypnotic. One to be projected onto a wall at the next Rosehill event :)


To launch the example application packaged with Gunicorn:
$ cd /path/to/gunicorn/examples/ $ gunicorn --workers=2 test:app
The module test:app specifies the complete module name and WSGI callable. You can replace it with anything that is available on your PYTHONPATH like such:
$ cd ~/ $ gunicorn --workers=12 awesomeproject.wsgi.main:main_app
To launch the websocket example application using Eventlet:
$ cd /path/to/gunicorn/examples/ $ gunicorn -w 12 -a "egg:gunicorn#eventlet" websocket:app
You should then be able to visit http://localhost:8000 to see output.
$ gunicorn --help Usage: gunicorn [OPTIONS] [APP_MODULE] Options: -c CONFIG, --config=CONFIG Config file. [none] -b BIND, --bind=BIND Adress to listen on. Ex. <IP_ADDRESS>:8000 or unix:/tmp/gunicorn.sock -w WORKERS, --workers=WORKERS Number of workers to spawn. [1] -a ARBITER, --arbiter=ARBITER gunicorn arbiter entry point or module [egg:gunicorn#main] -p PIDFILE, --pid=PIDFILE set the background PID FILE -D, --daemon Run daemonized in the background. -m UMASK, --umask=UMASK Define umask of daemon process -u USER, --user=USER Change worker user -g GROUP, --group=GROUP Change worker group -n APP_NAME, --name=APP_NAME Application name --log-level=LOGLEVEL Log level below which to silence messages. [info] --log-file=LOGFILE Log to a file. - equals stdout. [-] -d, --debug Debug mode. only 1 worker. --version show program's version number and exit -h, --help show this help message and exit
Django projects can be handled easily by Gunicorn using the gunicorn_django command:
$ cd $yourdjangoproject $ gunicorn_django --workers=2
But you can also use the run_gunicorn admin command like the other management.py commands.
Add "gunicorn" to INSTALLED_APPS in your settings file:
INSTALLED_APPS = ( ... "gunicorn", )
Then run:
python manage.py run_gunicorn
For Paste compatible projects (Pylons, TurboGears 2, ...) use the gunicorn_paste command:
$ cd $yourpasteproject $ gunicorn_paste --workers=2 development.ini
To use the paster command add a sever section for Gunicorn:
[server:main] use = egg:gunicorn#main host = <IP_ADDRESS> port = 5000
And then all you need to do is:
$ cd $yourpasteproject $ paster serve development.ini workers=2


Maybe not everyone wants to be a computer person. I mean, I'm into it, personally. I bet you are too, more or less. That is only going to go so far as far as maintaining the things that keep people alive. Electronics and the tech world can't farm us crops, yet. It can't produce things on par with the caliber of ingeunity that nature can. I mean, we can't 3d print carrots or lettuce or seeds, yet, nor can we bring extinct species back into the fold with the tech world. "Yet!", we say, as though we are so confident of our progress that we're already laughing about how its only a matter of time before we print out our kids ourselves.
My point is that the distance between the "haves" and the "have nots" will only be aggrivated by the constant progress of the tech world without a concern for its tail end. The people who don't want to be computer people. In the world I have beheld people who don't belong anywhere near a computer. Not because they would be frustrated, confused or have trouble understanding their uses or purposes, but because they were more of an "outside" person. Even sitting at a table looked confining for them, to me. What I'm saying is that for the tech world to simply offer solutions within its design is not the type of solution that is going to ever be best for everyone in the world. We need to understand that they need their space too, and we can't turn the planet intoCoruscant.


A search engine for github accounts
Name is required
{{profile.followers}} Followers {{profile.following}} Following {{profile.public_repos}} Repository
View profile on github
{{repos.description}}
Created on: {{repos.created_at | date}}


test package¶
Submodules¶
test.test_bluedart module¶
-
test.test_bluedart.
test_bluedart_cancel_package_failure
()¶ failure case for bluedart cancel package. :return:
-
test.test_bluedart.
test_bluedart_cancel_package_success
()¶ TODO: Success case to be written with a dummy set of valid data. :return:
-
test.test_bluedart.
test_bluedart_create_package_failure
()¶ failure case for bluedart create package. :return:
-
test.test_bluedart.
test_bluedart_create_package_success
()¶ TODO: Success case to be written with a dummy set of valid data. :return:
test.test_delhivery module¶
-
test.test_delhivery.
test_delhivery_cancel_package_failure
()¶ failure case for delhivery cancel package. :return:
-
test.test_delhivery.
test_delhivery_cancel_package_success
()¶ TODO: Success case to be written with a dummy set of valid data. :return:
-
test.test_delhivery.
test_delhivery_create_package_failure
()¶ failure case for delhivery create package. :return:
-
test.test_delhivery.
test_delhivery_create_package_success
()¶ TODO: Success case to be written with a dummy set of valid data. :return:
-
test.test_delhivery.
test_delhivery_create_pickup_failure
()¶ failure case for delhivery create pickup. :return:
-
test.test_delhivery.
test_delhivery_create_pickup_success
()¶ TODO: Success case to be written with a dummy set of valid data. :return: response
test.test_ecomm module¶
-
test.test_ecomm.
test_ecomm_cancel_package_failure
()¶ failure case for ecomm cancel package. :return:
-
test.test_ecomm.
test_ecomm_cancel_package_success
()¶ TODO: Success case to be written with a dummy set of valid data. :return:
-
test.test_ecomm.
test_ecomm_create_package_failure
()¶ failure case for ecomm create package. :return:
-
test.test_ecomm.
test_ecomm_create_package_success
()¶ TODO: Success case to be written with a dummy set of valid data. :return:


The proxy situation on Android is an embarrasment. It's scarcely credible, but Android didn't have a global proxy setting at all until quite recently, and it's still not supported on many common Android versions. In the meantime the app ecosystem has grown used to life without this basic necessity, and many apps merrily ignore it even if it's there. This situation is improving, but in many circumstances using transparent mode is mandatory for testing Android apps.
We used both an Asus Transformer Prime TF201 (Android 4.0.3) and a Nexus 4 (Android 4.4.4) in the examples below - your device may differ, but the broad process should be similar. On emulated devices, there are some additional quirks to consider.
The easiest way to get the certificate to the device is to use the web app. In the rare cases where the web app doesn't work, you will need to get the mitmproxy-ca-cert.cer file into the /sdcard folder on the device (/sdcard/Download on older devices). This can be accomplished in a number of ways:
Once we have the certificate on the local disk, we need to import it into the list of trusted CAs. Go to Settings -> Security -> Credential Storage, and select "Install from storage":
The certificate in /sdcard is automatically located and offered for installation. Installing the cert will delete the download file from the local disk.
You should now see something like this (you may have to explicitly name the certificate):
Click OK, and you should then see the certificate listed in the Trusted Credentials store:


This is where I should write very interesting things about myself.This is where I should write very interesting things about myself.This is where I should write very interesting things about myself.
This is where I should write very interesting things about myself.This is where I should write very interesting things about myself.This is where I should write very interesting things about myself.


Blog
Github
Resume
Linkedin
Projects
Home
Welcome to my project page!!
Here i will go into further depth on my project in addition to those not available on github


Todo
4 Tasks
-
20 Feb 2019
Server gateway
important
Due 10 days
-
20 Feb 2019
Server gateway
-
24 Feb 2019
Software update
-
26 Feb 2019
Network maintenance
In progress
4 Tasks
-
18 Apr 2019
Attached Preview Icon
-
20 Feb 2019
UI Design Started
important
Due 10 days
-
13 Mar 2019
New IOS Design
important
On Hold
4 Tasks
-
20 Feb 2019
Retail Order
important
Due 10 days
-
12 Jan 2019
HTML/CSS templates
important
Due 10 days


PFBTOPS(1) PFBTOPS(1) NAME pfbtops - translate a PostScript font in .pfb format to ASCII SYNOPSIS pfbtops [ -v ] [ pfb_file ] DESCRIPTION pfbtops translates a PostScript font in .pfb format to ASCII, splitting overlong lines in text packets into smaller chunks. If pfb_file is omit‐ ted the pfb file will be read from the standard input. The ASCII format PostScript font will be written on the standard output. PostScript fonts for MS-DOS are normally supplied in .pfb format. The resulting ASCII format PostScript font can be used with groff. It must first be listed in /usr/share/groff/1.21/font/devps/download. OPTIONS -v Print the version number. SEE ALSO grops(1) Groff Version 1.21 31 December 2010 PFBTOPS(1)


RectAreaLight emits light uniformly across the face a rectangular plane.
This light type can be used to simulate light sources such as bright
windows or strip lighting.
Important Notes:
const width = 10;
const height = 10;
const intensity = 1;
const rectLight = new THREE.RectAreaLight( 0xffffff, intensity, width, height );
rectLight.position.set( 5, 5, 0 );
rectLight.lookAt( 0, 0, 0 );
scene.add( rectLight )
const rectLightHelper = new RectAreaLightHelper( rectLight );
rectLight.add( rectLightHelper );
[example:webgl_lights_rectarealight WebGL / rectarealight ]
[page:Integer color] - (optional) hexadecimal color of the light. Default
is 0xffffff (white).
[page:Float intensity] - (optional) the light's intensity, or brightness.
Default is `1`.
[page:Float width] - (optional) width of the light. Default is `10`.
[page:Float height] - (optional) height of the light. Default is `10`.
Creates a new [name].
See the base [page:Light Light] class for common properties.
The height of the light.
The light's intensity. It is the luminance (brightness) of the light measured in nits (cd/m^2).
Default is `1`.
Changing the intensity will also change the light's power.
Read-only flag to check if a given object is of type [name].
The light's power.
Power is the luminous power of the light measured in lumens (lm).
Changing the power will also change the light's intensity.
The width of the light.
See the base [page:Light Light] class for common methods.
Copies value of all the properties from the [page:RectAreaLight source] to this RectAreaLight.
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]


We're sorry but guodanpi doesn't work properly without JavaScript enabled. Please enable it to continue.


Toggle navigation
Planview
Watch the Webcasts
Explore the Findings
Get the Reports
Assess Your Maturity
More
Infographic
About the Research
RMCP Handbook
Study Overview Video
Feedback
Planview Home


A CBLDocument is essentially a JSON object with an ID string that's unique in its database.
More...
|
| enum | CBLConcurrencyControl : uint8_t { kCBLConcurrencyControlLastWriteWins,
kCBLConcurrencyControlFailOnConflict
} |
| | Conflict-handling options when saving or deleting a document. More...
|
| |
| typedef bool(* | CBLConflictHandler) (void *context, CBLDocument *documentBeingSaved, const CBLDocument *conflictingDocument) |
| | Custom conflict handler for use when saving or deleting a document. More...
|
| |
| _cbl_warn_unused const CBLDocument * | CBLDatabase_GetDocument (const CBLDatabase *database, FLString docID) |
| | Reads a document from the database, creating a new (immutable) CBLDocument object. More...
|
| |
| static const CBLDocument * | CBLDocument_Retain (const CBLDocument *t) |
| |
| static void | CBLDocument_Release (const CBLDocument *t) |
| |
| bool | CBLDatabase_SaveDocument (CBLDatabase *db, CBLDocument *doc, CBLError *error) |
| | Saves a (mutable) document to the database. More...
|
| |
| bool | CBLDatabase_SaveDocumentWithConcurrencyControl (CBLDatabase *db, CBLDocument *doc, CBLConcurrencyControl concurrency, CBLError *error) |
| | Saves a (mutable) document to the database. More...
|
| |
| bool | CBLDatabase_SaveDocumentWithConflictHandler (CBLDatabase *db, CBLDocument *doc, CBLConflictHandler conflictHandler, void *context, CBLError *error) |
| | Saves a (mutable) document to the database, allowing for custom conflict handling in the event that the document has been updated since doc was loaded. More...
|
| |
| bool | CBLDatabase_DeleteDocument (CBLDatabase *db, const CBLDocument *document, CBLError *error) |
| | Deletes a document from the database. More...
|
| |
| bool | CBLDatabase_DeleteDocumentWithConcurrencyControl (CBLDatabase *db, const CBLDocument *document, CBLConcurrencyControl concurrency, CBLError *error) |
| | Deletes a document from the database. More...
|
| |
| bool | CBLDatabase_PurgeDocument (CBLDatabase *db, const CBLDocument *document, CBLError *error) |
| | Purges a document. More...
|
| |
| bool | CBLDatabase_PurgeDocumentByID (CBLDatabase *database, FLString docID, CBLError *error) |
| | Purges a document, given only its ID. More...
|
| |
|
A document's body is essentially a JSON object.
The properties are accessed in memory using the Fleece API, with the body itself being a dictionary).
|
| FLString | CBLDocument_ID (const CBLDocument *) |
| | Returns a document's ID. More...
|
| |
| FLString | CBLDocument_RevisionID (const CBLDocument *) |
| | Returns a document's revision ID, which is a short opaque string that's guaranteed to be unique to every change made to the document. More...
|
| |
| uint64_t | CBLDocument_Sequence (const CBLDocument *) |
| | Returns a document's current sequence in the local database. More...
|
| |
| FLDict | CBLDocument_Properties (const CBLDocument *) |
| | Returns a document's properties as a dictionary. More...
|
| |
| FLMutableDict | CBLDocument_MutableProperties (CBLDocument *) _cbl_returns_nonnull |
| | Returns a mutable document's properties as a mutable dictionary. More...
|
| |
| void | CBLDocument_SetProperties (CBLDocument *, FLMutableDict properties) |
| | Sets a mutable document's properties. More...
|
| |
| FLDoc | CBLDocument_ToFleeceDoc (const CBLDocument *) |
| |
| _cbl_warn_unused FLSliceResult | CBLDocument_ToJSON (const CBLDocument *) |
| | Returns a document's properties as JSON. More...
|
| |
| bool | CBLDocument_SetJSON (CBLDocument *, FLSlice json, CBLError *) |
| | Sets a mutable document's properties from a JSON string. More...
|
| |
| CBLTimestamp | CBLDatabase_GetDocumentExpiration (CBLDatabase *db, FLSlice docID, CBLError *error) |
| | Returns the time, if any, at which a given document will expire and be purged. More...
|
| |
| bool | CBLDatabase_SetDocumentExpiration (CBLDatabase *db, FLSlice docID, CBLTimestamp expiration, CBLError *error) |
| | Sets or clears the expiration time of a document. More...
|
| |
A CBLDocument is essentially a JSON object with an ID string that's unique in its database.
◆ CBLConflictHandler
| typedef bool(* CBLConflictHandler) (void *context, CBLDocument *documentBeingSaved, const CBLDocument *conflictingDocument) |
Custom conflict handler for use when saving or deleting a document.
This handler is called if the save would cause a conflict, i.e. if the document in the database has been updated (probably by a pull replicator, or by application code on another thread) since it was loaded into the CBLDocument being saved.
- Parameters
-
| context | The value of the context parameter you passed to CBLDatabase_SaveDocumentWithConflictHandler. |
| documentBeingSaved | The document being saved (same as the parameter you passed to CBLDatabase_SaveDocumentWithConflictHandler.) The callback may modify this document's properties as necessary to resolve the conflict. |
| conflictingDocument | The revision of the document currently in the database, which has been changed since documentBeingSaved was loaded. May be NULL, meaning that the document has been deleted. |
- Returns
- True to save the document, false to abort the save.
◆ CBLDocument
An in-memory copy of a document.
CBLDocument objects can be mutable or immutable. Immutable objects are referenced by const pointers; mutable ones by non-const pointers. This prevents you from accidentally calling a mutable-document function on an immutable document.
◆ CBLDocumentChangeListener
| typedef void(* CBLDocumentChangeListener) (void *context, const CBLDatabase *db, FLString docID) |
A document change listener callback, invoked after a specific document is changed on disk.
- Warning
- By default, this listener may be called on arbitrary threads. If your code isn't prepared for that, you may want to use CBLDatabase_BufferNotifications so that listeners will be called in a safe context.
- Parameters
-
| context | An arbitrary value given when the callback was registered. |
| db | The database containing the document. |
| docID | The document's ID. |
◆ CBLConcurrencyControl
Conflict-handling options when saving or deleting a document.
| Enumerator |
|---|
| kCBLConcurrencyControlLastWriteWins | The current save/delete will overwrite a conflicting revision if there is a conflict.
|
| kCBLConcurrencyControlFailOnConflict | The current save/delete will fail if there is a conflict.
|
◆ CBLDatabase_AddDocumentChangeListener()
Registers a document change listener callback.
It will be called after a specific document is changed on disk.
- Parameters
-
| db | The database to observe. |
| docID | The ID of the document to observe. |
| listener | The callback to be invoked. |
| context | An opaque value that will be passed to the callback. |
- Returns
- A token to be passed to CBLListener_Remove when it's time to remove the listener.
◆ CBLDatabase_DeleteDocument()
Deletes a document from the database.
Deletions are replicated.
- Warning
- You are still responsible for releasing the CBLDocument.
- Parameters
-
| db | The database containing the document. |
| document | The document to delete. |
| error | On failure, the error will be written here. |
- Returns
- True if the document was deleted, false if an error occurred.
◆ CBLDatabase_DeleteDocumentWithConcurrencyControl()
Deletes a document from the database.
Deletions are replicated.
- Warning
- You are still responsible for releasing the CBLDocument.
- Parameters
-
| db | The database containing the document. |
| document | The document to delete. |
| concurrency | Conflict-handling strategy. |
| error | On failure, the error will be written here. |
- Returns
- True if the document was deleted, false if an error occurred.
◆ CBLDatabase_GetDocument()
Reads a document from the database, creating a new (immutable) CBLDocument object.
Each call to this function creates a new object (which must later be released.)
- Note
- If you are reading the document in order to make changes to it, call CBLDatabase_GetMutableDocument instead.
- Parameters
-
| database | The database. |
| docID | The ID of the document. |
- Returns
- A new CBLDocument instance, or NULL if no document with that ID exists.
◆ CBLDatabase_GetDocumentExpiration()
Returns the time, if any, at which a given document will expire and be purged.
Documents don't normally expire; you have to call CBLDatabase_SetDocumentExpiration to set a document's expiration time.
- Parameters
-
| db | The database. |
| docID | The ID of the document. |
| error | On failure, an error is written here. |
- Returns
- The expiration time as a CBLTimestamp (milliseconds since Unix epoch), or 0 if the document does not have an expiration, or -1 if the call failed.
◆ CBLDatabase_GetMutableDocument()
Reads a document from the database, in mutable form that can be updated and saved.
(This function is otherwise identical to CBLDatabase_GetDocument.)
- Note
- You must release the document when you're done with it.
- Parameters
-
| database | The database. |
| docID | The ID of the document. |
- Returns
- A new mutable CBLDocument instance, or NULL if no document with that ID exists.
◆ CBLDatabase_PurgeDocument()
Purges a document.
This removes all traces of the document from the database. Purges are not replicated. If the document is changed on a server, it will be re-created when pulled.
- Warning
- You are still responsible for releasing the CBLDocument reference.
- Note
- If you don't have the document in memory already, CBLDatabase_PurgeDocumentByID is a simpler shortcut.
- Parameters
-
| db | The database containing the document. |
| document | The document to delete. |
| error | On failure, the error will be written here. |
- Returns
- True if the document was purged, false if it doesn't exist or the purge failed.
◆ CBLDatabase_PurgeDocumentByID()
Purges a document, given only its ID.
- Note
- If no document with that ID exists, this function will return false but the error code will be zero.
- Parameters
-
| database | The database. |
| docID | The document ID to purge. |
| error | On failure, the error will be written here. |
- Returns
- True if the document was purged, false if it doesn't exist or the purge failed.
◆ CBLDatabase_SaveDocument()
Saves a (mutable) document to the database.
- Warning
- If a newer revision has been saved since
doc
was loaded, it will be overwritten by this one. This can lead to data loss! To avoid this, call CBLDatabase_SaveDocumentWithConcurrencyControl or CBLDatabase_SaveDocumentWithConflictHandler instead.
- Parameters
-
| db | The database to save to. |
| doc | The mutable document to save. |
| error | On failure, the error will be written here. |
- Returns
- True on success, false on failure.
◆ CBLDatabase_SaveDocumentWithConcurrencyControl()
Saves a (mutable) document to the database.
If a conflicting revision has been saved since doc
was loaded, the concurrency
parameter specifies whether the save should fail, or the conflicting revision should be overwritten with the revision being saved. If you need finer-grained control, call CBLDatabase_SaveDocumentWithConflictHandler instead.
- Parameters
-
| db | The database to save to. |
| doc | The mutable document to save. |
| concurrency | Conflict-handling strategy (fail or overwrite). |
| error | On failure, the error will be written here. |
- Returns
- True on success, false on failure.
◆ CBLDatabase_SaveDocumentWithConflictHandler()
Saves a (mutable) document to the database, allowing for custom conflict handling in the event that the document has been updated since doc
was loaded.
- Parameters
-
| db | The database to save to. |
| doc | The mutable document to save. |
| conflictHandler | The callback to be invoked if there is a conflict. |
| context | An arbitrary value to be passed to the conflictHandler . |
| error | On failure, the error will be written here. |
- Returns
- True on success, false on failure.
◆ CBLDatabase_SetDocumentExpiration()
Sets or clears the expiration time of a document.
- Parameters
-
| db | The database. |
| docID | The ID of the document. |
| expiration | The expiration time as a CBLTimestamp (milliseconds since Unix epoch), or 0 if the document should never expire. |
| error | On failure, an error is written here. |
- Returns
- True on success, false on failure.
◆ CBLDocument_ID()
◆ CBLDocument_MutableProperties()
Returns a mutable document's properties as a mutable dictionary.
You may modify this dictionary and then call CBLDatabase_SaveDocument to persist the changes.
- Note
- The dictionary object is owned by the document; you do not need to release it.
-
Every call to this function returns the same mutable collection. This is the same collection returned by CBLDocument_Properties.
- Warning
- When the document is released, this reference to the properties becomes invalid. If you need to use any properties after releasing the document, you must retain them by calling FLValue_Retain (and of course later release them.)
◆ CBLDocument_New()
Creates a new, empty document in memory, with a randomly-generated unique ID.
It will not be added to a database until saved.
- Returns
- The new mutable document instance.
◆ CBLDocument_NewWithID()
Creates a new, empty document in memory, with the given ID.
It will not be added to a database until saved.
- Note
- If the given ID conflicts with a document already in the database, that will not be apparent until this document is saved. At that time, the result depends on the conflict handling mode used when saving; see the save functions for details.
- Parameters
-
| docID | The ID of the new document, or NULL to assign a new unique ID. |
- Returns
- The new mutable document instance.
◆ CBLDocument_Properties()
Returns a document's properties as a dictionary.
- Note
- The dictionary object is owned by the document; you do not need to release it.
- Warning
- When the document is released, this reference to the properties becomes invalid. If you need to use any properties after releasing the document, you must retain them by calling FLValue_Retain (and of course later release them.)
-
This dictionary reference is immutable, but if the document is mutable the underlying dictionary itself is mutable and could be modified through a mutable reference obtained via CBLDocument_MutableProperties. If you need to preserve the properties, call FLDict_MutableCopy to make a deep copy.
◆ CBLDocument_Release()
| static void CBLDocument_Release |
( |
const CBLDocument * |
t | ) |
|
|
inlinestatic |
◆ CBLDocument_Retain()
◆ CBLDocument_RevisionID()
Returns a document's revision ID, which is a short opaque string that's guaranteed to be unique to every change made to the document.
If the document doesn't exist yet, this function returns NULL.
◆ CBLDocument_Sequence()
Returns a document's current sequence in the local database.
This number increases every time the document is saved, and a more recently saved document will have a greater sequence number than one saved earlier, so sequences may be used as an abstract 'clock' to tell relative modification times.
◆ CBLDocument_SetJSON()
Sets a mutable document's properties from a JSON string.
◆ CBLDocument_SetProperties()
Sets a mutable document's properties.
Call CBLDatabase_SaveDocument to persist the changes.
- Note
- The dictionary object will be retained by the document. You are responsible for releasing any retained reference(s) you have to it.
◆ CBLDocument_ToFleeceDoc()
◆ CBLDocument_ToJSON()
Returns a document's properties as JSON.
- Note
- You are responsible for releasing the result by calling FLSliceResult_Release.
◆ CBLDocument_ToMutable()
Creates a new mutable CBLDocument instance that refers to the same document as the original.
If the original document has unsaved changes, the new one will also start out with the same changes; but mutating one document thereafter will not affect the other.
- Note
- You must release the new reference when you're done with it. Similarly, the original document still exists and must also be released when you're done with it.


• In order to know how these languages are compared, you must first understand how they work together.
Web pages that we view on a rugular basis is a build up of structure (HTML), style (CSS) and interaction (JavaScript).
• To explain this I will first break down what a "control flow", "if/else statement" is and also what "loops" are and the different types, then I will relate it to the example.
• In terms of waking up, that is a decision I make every day when I get up out of bed. Then my dayis followed by if and else statements, I will make decisions that I will repeat through out the day a known amount of times. I brush my teeth twice a day once in the morning and once in the night before I sleep, this will be a For loop. Now things that I won't be able to keep track of will be how many steps I will take, I would class that as a While loop since the amount will be unknown.
• Arrays are actually considered as an Object itself as everything in JavaScript is an Object. Therefore an Array inherits all its features from an Object. The point of an Array is to store multiple items of the same kind. Another thing feature of the Array is that its starts off from a zero based index, where the method is interacting to a collection of data. An Object, which we have already identified everything in JavaScript is an Object is a representation of the whole thing. In other words Objects can be used as a generic data storage, the only thing is it will not include the standard 0 start like Arrays.
• "Functions are like recipes", it is a block of code designed to perform a task. The Function takes data or variables, performs a set of tasks and returns the result. One of the glories of functions is that they allow us to write a chunk of code all at once, then we are able to reuse the code over and over again without rewriting it.


maketree
| Syntax | |||||
|
maketree path "pattern" | |||||
| Synopsis | |||||
| Print a directory tree for files that match the pattern. | |||||
| Options | |||||
| |||||
| Description | |||||
The program searches for files that match the specified pattern in the directory structure given as the search path. If a matching file is found then the elements of the directory tree are printed to standard output. This output can be used to recreate the directory structure containing the file. | |||||
| Examples | |||||
Search the directory " |


This keyboard attempts to help you to type any letters used in Nigerian orthographies.
On desktop type the key closest to the symbol you want (a for ə or a̠, e for ɛ or ẹ etc) and then type the semicolon key. Keep typing semicolon to switch between different symbols. After typing the base letter if you want a diacritic (tone mark or nasal) above the letter then type the top left 'back tick' key. For a nasal hold down shift as you type this.
On touch devices, press and hold down a key to see alternatives. For diacritics press and hold on the 'q' key at the top left.


7. Syntax patterns *:syn-pattern* *E401* *E402* In the syntax commands, a pattern must be surrounded by two identical characters. This is like it works for the ":s" command. The most common to use is the double quote. But if the pattern contains a double quote, you can use another character that is not used in the pattern. Examples: :syntax region Comment start="/\*" end="\*/" :syntax region String start=+"+ end=+"+ skip=+\\"+ See |pattern| for the explanation of what a pattern is. Syntax patterns are always interpreted like the 'magic' option is set, no matter what the actual value of 'magic' is. And the patterns are interpreted like the 'l' flag is not included in 'cpoptions'. This was done to make syntax files portable and independent of 'compatible' and 'magic' settings. Try to avoid patterns that can match an empty string, such as "[a-z]*". This slows down the highlighting a lot, because it matches everywhere. *:syn-pattern-offset* The pattern can be followed by a character offset. This can be used to change the highlighted part, and to change the text area included in the match or region (which only matters when trying to match other items). Both are relative to the matched pattern. The character offset for a skip pattern can be used to tell where to continue looking for an end pattern. The offset takes the form of "{what}={offset}" The {what} can be one of seven strings: ms Match Start offset for the start of the matched text me Match End offset for the end of the matched text hs Highlight Start offset for where the highlighting starts he Highlight End offset for where the highlighting ends rs Region Start offset for where the body of a region starts re Region End offset for where the body of a region ends lc Leading Context offset past "leading context" of pattern The {offset} can be: s start of the matched pattern s+{nr} start of the matched pattern plus {nr} chars to the right s-{nr} start of the matched pattern plus {nr} chars to the left e end of the matched pattern e+{nr} end of the matched pattern plus {nr} chars to the right e-{nr} end of the matched pattern plus {nr} chars to the left {nr} (for "lc" only): start matching {nr} chars to the left Examples: "ms=s+1", "hs=e-2", "lc=3". Although all offsets are accepted after any pattern, they are not always meaningful. This table shows which offsets are actually used: ms me hs he rs re lc match item yes yes yes yes - - yes region item start yes - yes - yes - yes region item skip - yes - - - - yes region item end - yes - yes - yes yes Offsets can be concatenated, with a ',' in between. Example: :syn match String /"[^"]*"/hs=s+1,he=e-1 some "string" text ^^^^^^ highlighted Notes: - There must be no white space between the pattern and the character offset(s). - The highlighted area will never be outside of the matched text. - A negative offset for an end pattern may not always work, because the end pattern may be detected when the highlighting should already have stopped. - Until Vim 7.2 the offsets were counted in bytes instead of characters. This didn't work well for multi-byte characters. - The start of a match cannot be in a line other than where the pattern matched. This doesn't work: "a\nb"ms=e. You can make the highlighting start in another line, this does work: "a\nb"hs=e. Example (match a comment but don't highlight the /* and */): :syntax region Comment start="/\*"hs=e+1 end="\*/"he=s-1 /* this is a comment */ ^^^^^^^^^^^^^^^^^^^ highlighted A more complicated Example: :syn region Exa matchgroup=Foo start="foo"hs=s+2,rs=e+2 matchgroup=Bar end="bar"me=e-1,he=e-1,re=s-1 abcfoostringbarabc mmmmmmmmmmm match sssrrreee highlight start/region/end ("Foo", "Exa" and "Bar") Leading context *:syn-lc* *:syn-leading* *:syn-context* Note: This is an obsolete feature, only included for backwards compatibility with previous Vim versions. It's now recommended to use the |/\@<=| construct in the pattern. The "lc" offset specifies leading context -- a part of the pattern that must be present, but is not considered part of the match. An offset of "lc=n" will cause Vim to step back n columns before attempting the pattern match, allowing characters which have already been matched in previous patterns to also be used as leading context for this match. This can be used, for instance, to specify that an "escaping" character must not precede the match: :syn match ZNoBackslash "[^\\]z"ms=s+1 :syn match WNoBackslash "[^\\]w"lc=1 :syn match Underline "_\+" ___zzzz ___wwww ^^^ ^^^ matches Underline ^ ^ matches ZNoBackslash ^^^^ matches WNoBackslash The "ms" offset is automatically set to the same value as the "lc" offset, unless you set "ms" explicitly. Multi-line patterns *:syn-multi-line* The patterns can include "\n" to match an end-of-line. Mostly this works as expected, but there are a few exceptions. When using a start pattern with an offset, the start of the match is not allowed to start in a following line. The highlighting can start in a following line though. The skip pattern can include the "\n", but the search for an end pattern will continue in the first character of the next line, also when that character is matched by the skip pattern. This is because redrawing may start in any line halfway a region and there is no check if the skip pattern started in a previous line. For example, if the skip pattern is "a\nb" and an end pattern is "b", the end pattern does match in the second line of this: x x a b x x Generally this means that the skip pattern should not match any characters after the "\n". External matches *:syn-ext-match* These extra regular expression items are available in region patterns: */\z(* */\z(\)* *E50* *E52* \z(\) Marks the sub-expression as "external", meaning that it is can be accessed from another pattern match. Currently only usable in defining a syntax region start pattern. */\z1* */\z2* */\z3* */\z4* */\z5* \z1 ... \z9 */\z6* */\z7* */\z8* */\z9* *E66* *E67* Matches the same string that was matched by the corresponding sub-expression in a previous start pattern match. Sometimes the start and end patterns of a region need to share a common sub-expression. A common example is the "here" document in Perl and many Unix shells. This effect can be achieved with the "\z" special regular expression items, which marks a sub-expression as "external", in the sense that it can be referenced from outside the pattern in which it is defined. The here-document example, for instance, can be done like this: :syn region hereDoc start="<<\z(\I\i*\)" end="^\z1$" As can be seen here, the \z actually does double duty. In the start pattern, it marks the "\(\I\i*\)" sub-expression as external; in the end pattern, it changes the \1 back-reference into an external reference referring to the first external sub-expression in the start pattern. External references can also be used in skip patterns: :syn region foo start="start \(\I\i*\)" skip="not end \z1" end="end \z1" Note that normal and external sub-expressions are completely orthogonal and indexed separately; for instance, if the pattern "\z(..\)\(..\)" is applied to the string "aabb", then \1 will refer to "bb" and \z1 will refer to "aa". Note also that external sub-expressions cannot be accessed as back-references within the same pattern like normal sub-expressions. If you want to use one sub-expression as both a normal and an external sub-expression, you can nest the two, as in "\(\z(...\)\)". Note that only matches within a single line can be used. Multi-line matches cannot be referred to.
8. Syntax clusters *:syn-cluster* *E400* :sy[ntax] cluster {cluster-name} [contains={group-name}..] [add={group-name}..] [remove={group-name}..] This command allows you to cluster a list of syntax groups together under a single name. contains={group-name}.. The cluster is set to the specified list of groups. add={group-name}.. The specified groups are added to the cluster. remove={group-name}.. The specified groups are removed from the cluster. A cluster so defined may be referred to in a contains=.., containedin=.., nextgroup=.., add=.. or remove=.. list with a "@" prefix. You can also use this notation to implicitly declare a cluster before specifying its contents. Example: :syntax match Thing "# [^#]\+ #" contains=@ThingMembers :syntax cluster ThingMembers contains=ThingMember1,ThingMember2 As the previous example suggests, modifications to a cluster are effectively retroactive; the membership of the cluster is checked at the last minute, so to speak: :syntax keyword A aaa :syntax keyword B bbb :syntax cluster AandB contains=A :syntax match Stuff "( aaa bbb )" contains=@AandB :syntax cluster AandB add=B " now both keywords are matched in Stuff This also has implications for nested clusters: :syntax keyword A aaa :syntax keyword B bbb :syntax cluster SmallGroup contains=B :syntax cluster BigGroup contains=A,@SmallGroup :syntax match Stuff "( aaa bbb )" contains=@BigGroup :syntax cluster BigGroup remove=B " no effect, since B isn't in BigGroup :syntax cluster SmallGroup remove=B " now bbb isn't matched within Stuff
9. Including syntax files *:syn-include* *E397* It is often useful for one language's syntax file to include a syntax file for a related language. Depending on the exact relationship, this can be done in two different ways: - If top-level syntax items in the included syntax file are to be allowed at the top level in the including syntax, you can simply use the |:runtime| command: " In cpp.vim: :runtime! syntax/c.vim :unlet b:current_syntax - If top-level syntax items in the included syntax file are to be contained within a region in the including syntax, you can use the ":syntax include" command: :sy[ntax] include [@{grouplist-name}] {file-name} All syntax items declared in the included file will have the "contained" flag added. In addition, if a group list is specified, all top-level syntax items in the included file will be added to that list. " In perl.vim: :syntax include @Pod <sfile>:p:h/pod.vim :syntax region perlPOD start="^=head" end="^=cut" contains=@Pod When {file-name} is an absolute path (starts with "/", "c:", "$VAR" or "<sfile>") that file is sourced. When it is a relative path (e.g., "syntax/pod.vim") the file is searched for in 'runtimepath'. All matching files are loaded. Using a relative path is recommended, because it allows a user to replace the included file with his own version, without replacing the file that does the ":syn include".
10. Synchronizing *:syn-sync* *E403* *E404* Vim wants to be able to start redrawing in any position in the document. To make this possible it needs to know the syntax state at the position where redrawing starts. :sy[ntax] sync [ccomment [group-name] | minlines={N} | ...] There are four ways to synchronize: 1. Always parse from the start of the file. |:syn-sync-first| 2. Based on C-style comments. Vim understands how C-comments work and can figure out if the current line starts inside or outside a comment. |:syn-sync-second| 3. Jumping back a certain number of lines and start parsing there. |:syn-sync-third| 4. Searching backwards in the text for a pattern to sync on. |:syn-sync-fourth| *:syn-sync-maxlines* *:syn-sync-minlines* For the last three methods, the line range where the parsing can start is limited by "minlines" and "maxlines". If the "minlines={N}" argument is given, the parsing always starts at least that many lines backwards. This can be used if the parsing may take a few lines before it's correct, or when it's not possible to use syncing. If the "maxlines={N}" argument is given, the number of lines that are searched for a comment or syncing pattern is restricted to N lines backwards (after adding "minlines"). This is useful if you have few things to sync on and a slow machine. Example: :syntax sync ccomment maxlines=500 *:syn-sync-linebreaks* When using a pattern that matches multiple lines, a change in one line may cause a pattern to no longer match in a previous line. This means has to start above where the change was made. How many lines can be specified with the "linebreaks" argument. For example, when a pattern may include one line break use this: :syntax sync linebreaks=1 The result is that redrawing always starts at least one line before where a change was made. The default value for "linebreaks" is zero. Usually the value for "minlines" is bigger than "linebreaks". First syncing method: *:syn-sync-first* :syntax sync fromstart The file will be parsed from the start. This makes syntax highlighting accurate, but can be slow for long files. Vim caches previously parsed text, so that it's only slow when parsing the text for the first time. However, when making changes some part of the next needs to be parsed again (worst case: to the end of the file). Using "fromstart" is equivalent to using "minlines" with a very large number. Second syncing method: *:syn-sync-second* *:syn-sync-ccomment* For the second method, only the "ccomment" argument needs to be given. Example: :syntax sync ccomment When Vim finds that the line where displaying starts is inside a C-style comment, the last region syntax item with the group-name "Comment" will be used. This requires that there is a region with the group-name "Comment"! An alternate group name can be specified, for example: :syntax sync ccomment javaComment This means that the last item specified with "syn region javaComment" will be used for the detected C comment region. This only works properly if that region does have a start pattern "\/*" and an end pattern "*\/". The "maxlines" argument can be used to restrict the search to a number of lines. The "minlines" argument can be used to at least start a number of lines back (e.g., for when there is some construct that only takes a few lines, but it hard to sync on). Note: Syncing on a C comment doesn't work properly when strings are used that cross a line and contain a "*/". Since letting strings cross a line is a bad programming habit (many compilers give a warning message), and the chance of a "*/" appearing inside a comment is very small, this restriction is hardly ever noticed. Third syncing method: *:syn-sync-third* For the third method, only the "minlines={N}" argument needs to be given. Vim will subtract {N} from the line number and start parsing there. This means {N} extra lines need to be parsed, which makes this method a bit slower. Example: :syntax sync minlines=50 "lines" is equivalent to "minlines" (used by older versions). Fourth syncing method: *:syn-sync-fourth* The idea is to synchronize on the end of a few specific regions, called a sync pattern. Only regions can cross lines, so when we find the end of some region, we might be able to know in which syntax item we are. The search starts in the line just above the one where redrawing starts. From there the search continues backwards in the file. This works just like the non-syncing syntax items. You can use contained matches, nextgroup, etc. But there are a few differences: - Keywords cannot be used. - The syntax items with the "sync" keyword form a completely separated group of syntax items. You can't mix syncing groups and non-syncing groups. - The matching works backwards in the buffer (line by line), instead of forwards. - A line continuation pattern can be given. It is used to decide which group of lines need to be searched like they were one line. This means that the search for a match with the specified items starts in the first of the consecutive that contain the continuation pattern. - When using "nextgroup" or "contains", this only works within one line (or group of continued lines). - When using a region, it must start and end in the same line (or group of continued lines). Otherwise the end is assumed to be at the end of the line (or group of continued lines). - When a match with a sync pattern is found, the rest of the line (or group of continued lines) is searched for another match. The last match is used. This is used when a line can contain both the start end the end of a region (e.g., in a C-comment like /* this */, the last "*/" is used). There are two ways how a match with a sync pattern can be used: 1. Parsing for highlighting starts where redrawing starts (and where the search for the sync pattern started). The syntax group that is expected to be valid there must be specified. This works well when the regions that cross lines cannot contain other regions. 2. Parsing for highlighting continues just after the match. The syntax group that is expected to be present just after the match must be specified. This can be used when the previous method doesn't work well. It's much slower, because more text needs to be parsed. Both types of sync patterns can be used at the same time. Besides the sync patterns, other matches and regions can be specified, to avoid finding unwanted matches. [The reason that the sync patterns are given separately, is that mostly the search for the sync point can be much simpler than figuring out the highlighting. The reduced number of patterns means it will go (much) faster.] *syn-sync-grouphere* *E393* *E394* :syntax sync match {sync-group-name} grouphere {group-name} "pattern" .. Define a match that is used for syncing. {group-name} is the name of a syntax group that follows just after the match. Parsing of the text for highlighting starts just after the match. A region must exist for this {group-name}. The first one defined will be used. "NONE" can be used for when there is no syntax group after the match. *syn-sync-groupthere* :syntax sync match {sync-group-name} groupthere {group-name} "pattern" .. Like "grouphere", but {group-name} is the name of a syntax group that is to be used at the start of the line where searching for the sync point started. The text between the match and the start of the sync pattern searching is assumed not to change the syntax highlighting. For example, in C you could search backwards for "/*" and "*/". If "/*" is found first, you know that you are inside a comment, so the "groupthere" is "cComment". If "*/" is found first, you know that you are not in a comment, so the "groupthere" is "NONE". (in practice it's a bit more complicated, because the "/*" and "*/" could appear inside a string. That's left as an exercise to the reader...). :syntax sync match .. :syntax sync region .. Without a "groupthere" argument. Define a region or match that is skipped while searching for a sync point. *syn-sync-linecont* :syntax sync linecont {pattern} When {pattern} matches in a line, it is considered to continue in the next line. This means that the search for a sync point will consider the lines to be concatenated. If the "maxlines={N}" argument is given too, the number of lines that are searched for a match is restricted to N. This is useful if you have very few things to sync on and a slow machine. Example: :syntax sync maxlines=100 You can clear all sync settings with: :syntax sync clear You can clear specific sync patterns with: :syntax sync clear {sync-group-name} ..
11. Listing syntax items *:syntax* *:sy* *:syn* *:syn-list* This command lists all the syntax items: :sy[ntax] [list] To show the syntax items for one syntax group: :sy[ntax] list {group-name} To list the syntax groups in one cluster: *E392* > :sy[ntax] list @{cluster-name} See above for other arguments for the ":syntax" command. Note that the ":syntax" command can be abbreviated to ":sy", although ":syn" is mostly used, because it looks better.
12. Highlight command *:highlight* *:hi* *E28* *E411* *E415* There are three types of highlight groups: - The ones used for specific languages. For these the name starts with the name of the language. Many of these don't have any attributes, but are linked to a group of the second type. - The ones used for all syntax languages. - The ones used for the 'highlight' option. *hitest.vim* You can see all the groups currently active with this command: :so $VIMRUNTIME/syntax/hitest.vim This will open a new window containing all highlight group names, displayed in their own color. *:colo* *:colorscheme* *E185* :colo[rscheme] {name} Load color scheme {name}. This searches 'runtimepath' for the file "colors/{name}.vim. The first one that is found is loaded. To see the name of the currently active color scheme (if there is one): :echo g:colors_name Doesn't work recursively, thus you can't use ":colorscheme" in a color scheme script. After the color scheme has been loaded the |ColorScheme| autocommand event is triggered. For info about writing a colorscheme file: :edit $VIMRUNTIME/colors/README.txt :hi[ghlight] List all the current highlight groups that have attributes set. :hi[ghlight] {group-name} List one highlight group. :hi[ghlight] clear Reset all highlighting to the defaults. Removes all highlighting for groups added by the user! Uses the current value of 'background' to decide which default colors to use. :hi[ghlight] clear {group-name} :hi[ghlight] {group-name} NONE Disable the highlighting for one highlight group. It is _not_ set back to the default colors. :hi[ghlight] [default] {group-name} {key}={arg} .. Add a highlight group, or change the highlighting for an existing group. See |highlight-args| for the {key}={arg} arguments. See |:highlight-default| for the optional [default] argument. Normally a highlight group is added once when starting up. This sets the default values for the highlighting. After that, you can use additional highlight commands to change the arguments that you want to set to non-default values. The value "NONE" can be used to switch the value off or go back to the default value. A simple way to change colors is with the |:colorscheme| command. This loads a file with ":highlight" commands such as this: :hi Comment gui=bold Note that all settings that are not included remain the same, only the specified field is used, and settings are merged with previous ones. So, the result is like this single command has been used: :hi Comment term=bold ctermfg=Cyan guifg=#80a0ff gui=bold *:highlight-verbose* When listing a highlight group and 'verbose' is non-zero, the listing will also tell where it was last set. Example: :verbose hi Comment Comment xxx term=bold ctermfg=4 guifg=Blue Last set from /home/mool/vim/vim7/runtime/syntax/syncolor.vim When ":hi clear" is used then the script where this command is used will be mentioned for the default values. See |:verbose-cmd| for more information. *highlight-args* *E416* *E417* *E423* There are three types of terminals for highlighting: term a normal terminal (vt100, xterm) cterm a color terminal (MS-DOS console, color-xterm, these have the "Co" termcap entry) gui the GUI For each type the highlighting can be given. This makes it possible to use the same syntax file on all terminals, and use the optimal highlighting. 1. highlight arguments for normal terminals *bold* *underline* *undercurl* *inverse* *italic* *standout* term={attr-list} *attr-list* *highlight-term* *E418* attr-list is a comma separated list (without spaces) of the following items (in any order): bold underline undercurl not always available reverse inverse same as reverse italic standout NONE no attributes used (used to reset it) Note that "bold" can be used here and by using a bold font. They have the same effect. "undercurl" is a curly underline. When "undercurl" is not possible then "underline" is used. In general "undercurl" is only available in the GUI. The color is set with |highlight-guisp|. start={term-list} *highlight-start* *E422* stop={term-list} *term-list* *highlight-stop* These lists of terminal codes can be used to get non-standard attributes on a terminal. The escape sequence specified with the "start" argument is written before the characters in the highlighted area. It can be anything that you want to send to the terminal to highlight this area. The escape sequence specified with the "stop" argument is written after the highlighted area. This should undo the "start" argument. Otherwise the screen will look messed up. The {term-list} can have two forms: 1. A string with escape sequences. This is any string of characters, except that it can't start with "t_" and blanks are not allowed. The <> notation is recognized here, so you can use things like "<Esc>" and "<Space>". Example: start=<Esc>[27h;<Esc>[<Space>r; 2. A list of terminal codes. Each terminal code has the form "t_xx", where "xx" is the name of the termcap entry. The codes have to be separated with commas. White space is not allowed. Example: start=t_C1,t_BL The terminal codes must exist for this to work. 2. highlight arguments for color terminals cterm={attr-list} *highlight-cterm* See above for the description of {attr-list} |attr-list|. The "cterm" argument is likely to be different from "term", when colors are used. For example, in a normal terminal comments could be underlined, in a color terminal they can be made Blue. Note: Many terminals (e.g., DOS console) can't mix these attributes with coloring. Use only one of "cterm=" OR "ctermfg=" OR "ctermbg=". ctermfg={color-nr} *highlight-ctermfg* *E421* ctermbg={color-nr} *highlight-ctermbg* The {color-nr} argument is a color number. Its range is zero to (not including) the number given by the termcap entry "Co". The actual color with this number depends on the type of terminal and its settings. Sometimes the color also depends on the settings of "cterm". For example, on some systems "cterm=bold ctermfg=3" gives another color, on others you just get color 3. For an xterm this depends on your resources, and is a bit unpredictable. See your xterm documentation for the defaults. The colors for a color-xterm can be changed from the .Xdefaults file. Unfortunately this means that it's not possible to get the same colors for each user. See |xterm-color| for info about color xterms. The MSDOS standard colors are fixed (in a console window), so these have been used for the names. But the meaning of color names in X11 are fixed, so these color settings have been used, to make the highlighting settings portable (complicated, isn't it?). The following names are recognized, with the color number used: *cterm-colors* NR-16 NR-8 COLOR NAME 0 0 Black 1 4 DarkBlue 2 2 DarkGreen 3 6 DarkCyan 4 1 DarkRed 5 5 DarkMagenta 6 3 Brown, DarkYellow 7 7 LightGray, LightGrey, Gray, Grey 8 0* DarkGray, DarkGrey 9 4* Blue, LightBlue 10 2* Green, LightGreen 11 6* Cyan, LightCyan 12 1* Red, LightRed 13 5* Magenta, LightMagenta 14 3* Yellow, LightYellow 15 7* White The number under "NR-16" is used for 16-color terminals ('t_Co' greater than or equal to 16). The number under "NR-8" is used for 8-color terminals ('t_Co' less than 16). The '*' indicates that the bold attribute is set for ctermfg. In many 8-color terminals (e.g., "linux"), this causes the bright colors to appear. This doesn't work for background colors! Without the '*' the bold attribute is removed. If you want to set the bold attribute in a different way, put a "cterm=" argument AFTER the "ctermfg=" or "ctermbg=" argument. Or use a number instead of a color name. The case of the color names is ignored. Note that for 16 color ansi style terminals (including xterms), the numbers in the NR-8 column is used. Here '*' means 'add 8' so that Blue is 12, DarkGray is 8 etc. Note that for some color terminals these names may result in the wrong colors! *:hi-normal-cterm* When setting the "ctermfg" or "ctermbg" colors for the Normal group, these will become the colors used for the non-highlighted text. Example: :highlight Normal ctermfg=grey ctermbg=darkblue When setting the "ctermbg" color for the Normal group, the 'background' option will be adjusted automatically. This causes the highlight groups that depend on 'background' to change! This means you should set the colors for Normal first, before setting other colors. When a colorscheme is being used, changing 'background' causes it to be reloaded, which may reset all colors (including Normal). First delete the "colors_name" variable when you don't want this. When you have set "ctermfg" or "ctermbg" for the Normal group, Vim needs to reset the color when exiting. This is done with the "op" termcap entry |t_op|. If this doesn't work correctly, try setting the 't_op' option in your .vimrc. *E419* *E420* When Vim knows the normal foreground and background colors, "fg" and "bg" can be used as color names. This only works after setting the colors for the Normal group and for the MS-DOS console. Example, for reverse video: :highlight Visual ctermfg=bg ctermbg=fg Note that the colors are used that are valid at the moment this command are given. If the Normal group colors are changed later, the "fg" and "bg" colors will not be adjusted. 3. highlight arguments for the GUI gui={attr-list} *highlight-gui* These give the attributes to use in the GUI mode. See |attr-list| for a description. Note that "bold" can be used here and by using a bold font. They have the same effect. Note that the attributes are ignored for the "Normal" group. font={font-name} *highlight-font* font-name is the name of a font, as it is used on the system Vim runs on. For X11 this is a complicated name, for example: font=-misc-fixed-bold-r-normal--14-130-75-75-c-70-iso8859-1 The font-name "NONE" can be used to revert to the default font. When setting the font for the "Normal" group, this becomes the default font (until the 'guifont' option is changed; the last one set is used). The following only works with Motif and Athena, not with other GUIs: When setting the font for the "Menu" group, the menus will be changed. When setting the font for the "Tooltip" group, the tooltips will be changed. All fonts used, except for Menu and Tooltip, should be of the same character size as the default font! Otherwise redrawing problems will occur. guifg={color-name} *highlight-guifg* guibg={color-name} *highlight-guibg* guisp={color-name} *highlight-guisp* These give the foreground (guifg), background (guibg) and special (guisp) color to use in the GUI. "guisp" is used for undercurl. There are a few special names: NONE no color (transparent) bg use normal background color background use normal background color fg use normal foreground color foreground use normal foreground color To use a color name with an embedded space or other special character, put it in single quotes. The single quote cannot be used then. Example: :hi comment guifg='salmon pink' *gui-colors* Suggested color names (these are available on most systems): Red LightRed DarkRed Green LightGreen DarkGreen SeaGreen Blue LightBlue DarkBlue SlateBlue Cyan LightCyan DarkCyan Magenta LightMagenta DarkMagenta Yellow LightYellow Brown DarkYellow Gray LightGray DarkGray Black White Orange Purple Violet In the Win32 GUI version, additional system colors are available. See |win32-colors|. You can also specify a color by its Red, Green and Blue values. The format is "#rrggbb", where "rr" is the Red value "gg" is the Green value "bb" is the Blue value All values are hexadecimal, range from "00" to "ff". Examples: :highlight Comment guifg=#11f0c3 guibg=#ff00ff *highlight-groups* *highlight-default* These are the default highlighting groups. These groups are used by the 'highlight' option default. Note that the highlighting depends on the value of 'background'. You can see the current settings with the ":highlight" command. *hl-Cursor* Cursor the character under the cursor *hl-CursorIM* CursorIM like Cursor, but used when in IME mode |CursorIM| *hl-CursorColumn* CursorColumn the screen column that the cursor is in when 'cursorcolumn' is set *hl-CursorLine* CursorLine the screen line that the cursor is in when 'cursorline' is set *hl-Directory* Directory directory names (and other special names in listings) *hl-DiffAdd* DiffAdd diff mode: Added line |diff.txt| *hl-DiffChange* DiffChange diff mode: Changed line |diff.txt| *hl-DiffDelete* DiffDelete diff mode: Deleted line |diff.txt| *hl-DiffText* DiffText diff mode: Changed text within a changed line |diff.txt| *hl-ErrorMsg* ErrorMsg error messages on the command line *hl-VertSplit* VertSplit the column separating vertically split windows *hl-Folded* Folded line used for closed folds *hl-FoldColumn* FoldColumn 'foldcolumn' *hl-SignColumn* SignColumn column where |signs| are displayed *hl-IncSearch* IncSearch 'incsearch' highlighting; also used for the text replaced with ":s///c" *hl-LineNr* LineNr Line number for ":number" and ":#" commands, and when 'number' option is set. *hl-MatchParen* MatchParen The character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt| *hl-ModeMsg* ModeMsg 'showmode' message (e.g., "-- INSERT --") *hl-MoreMsg* MoreMsg |more-prompt| *hl-NonText* NonText '~' and '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). *hl-Normal* Normal normal text *hl-Pmenu* Pmenu Popup menu: normal item. *hl-PmenuSel* PmenuSel Popup menu: selected item. *hl-PmenuSbar* PmenuSbar Popup menu: scrollbar. *hl-PmenuThumb* PmenuThumb Popup menu: Thumb of the scrollbar. *hl-Question* Question |hit-enter| prompt and yes/no questions *hl-Search* Search Last search pattern highlighting (see 'hlsearch'). Also used for highlighting the current line in the quickfix window and similar items that need to stand out. *hl-SpecialKey* SpecialKey Meta and special keys listed with ":map", also for text used to show unprintable characters in the text, 'listchars'. Generally: text that is displayed differently from what it really is. *hl-SpellBad* SpellBad Word that is not recognized by the spellchecker. |spell| This will be combined with the highlighting used otherwise. *hl-SpellCap* SpellCap Word that should start with a capital. |spell| This will be combined with the highlighting used otherwise. *hl-SpellLocal* SpellLocal Word that is recognized by the spellchecker as one that is used in another region. |spell| This will be combined with the highlighting used otherwise. *hl-SpellRare* SpellRare Word that is recognized by the spellchecker as one that is hardly ever used. |spell| This will be combined with the highlighting used otherwise. *hl-StatusLine* StatusLine status line of current window *hl-StatusLineNC* StatusLineNC status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window. *hl-TabLine* TabLine tab pages line, not active tab page label *hl-TabLineFill* TabLineFill tab pages line, where there are no labels *hl-TabLineSel* TabLineSel tab pages line, active tab page label *hl-Title* Title titles for output from ":set all", ":autocmd" etc. *hl-Visual* Visual Visual mode selection *hl-VisualNOS* VisualNOS Visual mode selection when vim is "Not Owning the Selection". Only X11 Gui's |gui-x11| and |xterm-clipboard| supports this. *hl-WarningMsg* WarningMsg warning messages *hl-WildMenu* WildMenu current match in 'wildmenu' completion *hl-User1* *hl-User1..9* *hl-User9* The 'statusline' syntax allows the use of 9 different highlights in the statusline and ruler (via 'rulerformat'). The names are User1 to User9. For the GUI you can use the following groups to set the colors for the menu, scrollbars and tooltips. They don't have defaults. This doesn't work for the Win32 GUI. Only three highlight arguments have any effect here: font, guibg, and guifg. *hl-Menu* Menu Current font, background and foreground colors of the menus. Also used for the toolbar. Applicable highlight arguments: font, guibg, guifg. NOTE: For Motif and Athena the font argument actually specifies a fontset at all times, no matter if 'guifontset' is empty, and as such it is tied to the current |:language| when set. *hl-Scrollbar* Scrollbar Current background and foreground of the main window's scrollbars. Applicable highlight arguments: guibg, guifg. *hl-Tooltip* Tooltip Current font, background and foreground of the tooltips. Applicable highlight arguments: font, guibg, guifg. NOTE: For Motif and Athena the font argument actually specifies a fontset at all times, no matter if 'guifontset' is empty, and as such it is tied to the current |:language| when set.
13. Linking groups *:hi-link* *:highlight-link* *E412* *E413* When you want to use the same highlighting for several syntax groups, you can do this more easily by linking the groups into one common highlight group, and give the color attributes only for that group. To set a link: :hi[ghlight][!] [default] link {from-group} {to-group} To remove a link: :hi[ghlight][!] [default] link {from-group} NONE Notes: *E414* - If the {from-group} and/or {to-group} doesn't exist, it is created. You don't get an error message for a non-existing group. - As soon as you use a ":highlight" command for a linked group, the link is removed. - If there are already highlight settings for the {from-group}, the link is not made, unless the '!' is given. For a ":highlight link" command in a sourced file, you don't get an error message. This can be used to skip links for groups that already have settings. *:hi-default* *:highlight-default* The [default] argument is used for setting the default highlighting for a group. If highlighting has already been specified for the group the command will be ignored. Also when there is an existing link. Using [default] is especially useful to overrule the highlighting of a specific syntax file. For example, the C syntax file contains: :highlight default link cComment Comment If you like Question highlighting for C comments, put this in your vimrc file: :highlight link cComment Question Without the "default" in the C syntax file, the highlighting would be overruled when the syntax file is loaded.
14. Cleaning up *:syn-clear* *E391* If you want to clear the syntax stuff for the current buffer, you can use this command: :syntax clear This command should be used when you want to switch off syntax highlighting, or when you want to switch to using another syntax. It's normally not needed in a syntax file itself, because syntax is cleared by the autocommands that load the syntax file. The command also deletes the "b:current_syntax" variable, since no syntax is loaded after this command. If you want to disable syntax highlighting for all buffers, you need to remove the autocommands that load the syntax files: :syntax off What this command actually does, is executing the command :source $VIMRUNTIME/syntax/nosyntax.vim See the "nosyntax.vim" file for details. Note that for this to work $VIMRUNTIME must be valid. See |$VIMRUNTIME|. To clean up specific syntax groups for the current buffer: :syntax clear {group-name} .. This removes all patterns and keywords for {group-name}. To clean up specific syntax group lists for the current buffer: :syntax clear @{grouplist-name} .. This sets {grouplist-name}'s contents to an empty list. *:syntax-reset* *:syn-reset* If you have changed the colors and messed them up, use this command to get the defaults back: :syntax reset This doesn't change the colors for the 'highlight' option. Note that the syntax colors that you set in your vimrc file will also be reset back to their Vim default. Note that if you are using a color scheme, the colors defined by the color scheme for syntax highlighting will be lost. What this actually does is: let g:syntax_cmd = "reset" runtime! syntax/syncolor.vim Note that this uses the 'runtimepath' option. *syncolor* If you want to use different colors for syntax highlighting, you can add a Vim script file to set these colors. Put this file in a directory in 'runtimepath' which comes after $VIMRUNTIME, so that your settings overrule the default colors. This way these colors will be used after the ":syntax reset" command. For Unix you can use the file ~/.vim/after/syntax/syncolor.vim. Example: if &background == "light" highlight comment ctermfg=darkgreen guifg=darkgreen else highlight comment ctermfg=green guifg=green endif *E679* Do make sure this syncolor.vim script does not use a "syntax on", set the 'background' option or uses a "colorscheme" command, because it results in an endless loop. Note that when a color scheme is used, there might be some confusion whether your defined colors are to be used or the colors from the scheme. This depends on the color scheme file. See |:colorscheme|. *syntax_cmd* The "syntax_cmd" variable is set to one of these values when the syntax/syncolor.vim files are loaded: "on" ":syntax on" command. Highlight colors are overruled but links are kept "enable" ":syntax enable" command. Only define colors for groups that don't have highlighting yet. Use ":syntax default". "reset" ":syntax reset" command or loading a color scheme. Define all the colors. "skip" Don't define colors. Used to skip the default settings when a syncolor.vim file earlier in 'runtimepath' has already set them.
15. Highlighting tags *tag-highlight* If you want to highlight all the tags in your file, you can use the following mappings. <F11> -- Generate tags.vim file, and highlight tags. <F12> -- Just highlight tags based on existing tags.vim file. :map <F11> :sp tags<CR>:%s/^\([^ :]*:\)\=\([^ ]*\).*/syntax keyword Tag \2/<CR>:wq! tags.vim<CR>/^<CR><F12> :map <F12> :so tags.vim<CR> WARNING: The longer the tags file, the slower this will be, and the more memory Vim will consume. Only highlighting typedefs, unions and structs can be done too. For this you must use Exuberant ctags found at http://ctags.sf.net. Put these lines in your Makefile: # Make a highlight file for types. Requires Exuberant ctags and awk types: types.vim types.vim: *.[ch] ctags --c-kinds=gstu -o- *.[ch] YXXY\ awk 'BEGIN{printf("syntax keyword Type\t")}\ {printf("%s ", $$1)}END{print ""}' > $@ And put these lines in your .vimrc: " load the types.vim highlighting file, if it exists autocmd BufRead,BufNewFile *.[ch] let fname = expand('<afile>:p:h') . '/types.vim' autocmd BufRead,BufNewFile *.[ch] if filereadable(fname) autocmd BufRead,BufNewFile *.[ch] exe 'so ' . fname autocmd BufRead,BufNewFile *.[ch] endif
16. Color xterms *xterm-color* *color-xterm* Most color xterms have only eight colors. If you don't get colors with the default setup, it should work with these lines in your .vimrc: :if &term =~ "xterm" : if has("terminfo") : set t_Co=8 : set t_Sf=<Esc>[3%p1%dm : set t_Sb=<Esc>[4%p1%dm : else : set t_Co=8 : set t_Sf=<Esc>[3%dm : set t_Sb=<Esc>[4%dm : endif :endif [<Esc> is a real escape, type CTRL-V <Esc>] You might want to change the first "if" to match the name of your terminal, e.g. "dtterm" instead of "xterm". Note: Do these settings BEFORE doing ":syntax on". Otherwise the colors may be wrong. *xiterm* *rxvt* The above settings have been mentioned to work for xiterm and rxvt too. But for using 16 colors in an rxvt these should work with terminfo: :set t_AB=<Esc>[%?%p1%{8}%<%t25;%p1%{40}%+%e5;%p1%{32}%+%;%dm :set t_AF=<Esc>[%?%p1%{8}%<%t22;%p1%{30}%+%e1;%p1%{22}%+%;%dm *colortest.vim* To test your color setup, a file has been included in the Vim distribution. To use it, execute this command: :runtime syntax/colortest.vim Some versions of xterm (and other terminals, like the Linux console) can output lighter foreground colors, even though the number of colors is defined at 8. Therefore Vim sets the "cterm=bold" attribute for light foreground colors, when 't_Co' is 8. *xfree-xterm* To get 16 colors or more, get the newest xterm version (which should be included with XFree86 3.3 and later). You can also find the latest version at: http://invisible-island.net/xterm/xterm.html Here is a good way to configure it. This uses 88 colors and enables the termcap-query feature, which allows Vim to ask the xterm how many colors it supports. ./configure --disable-bold-color --enable-88-color --enable-tcap-query If you only get 8 colors, check the xterm compilation settings. (Also see |UTF8-xterm| for using this xterm with UTF-8 character encoding). This xterm should work with these lines in your .vimrc (for 16 colors): :if has("terminfo") : set t_Co=16 : set t_AB=<Esc>[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{92}%+%;%dm : set t_AF=<Esc>[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{82}%+%;%dm :else : set t_Co=16 : set t_Sf=<Esc>[3%dm : set t_Sb=<Esc>[4%dm :endif [<Esc> is a real escape, type CTRL-V <Esc>] Without |+terminfo|, Vim will recognize these settings, and automatically translate cterm colors of 8 and above to "<Esc>[9%dm" and "<Esc>[10%dm". Colors above 16 are also translated automatically. For 256 colors this has been reported to work: :set t_AB=<Esc>[48;5;%dm :set t_AF=<Esc>[38;5;%dm Or just set the TERM environment variable to "xterm-color" or "xterm-16color" and try if that works. You probably want to use these X resources (in your ~/.Xdefaults file): XTerm*color0: #000000 XTerm*color1: #c00000 XTerm*color2: #008000 XTerm*color3: #808000 XTerm*color4: #0000c0 XTerm*color5: #c000c0 XTerm*color6: #008080 XTerm*color7: #c0c0c0 XTerm*color8: #808080 XTerm*color9: #ff6060 XTerm*color10: #00ff00 XTerm*color11: #ffff00 XTerm*color12: #8080ff XTerm*color13: #ff40ff XTerm*color14: #00ffff XTerm*color15: #ffffff Xterm*cursorColor: Black [Note: The cursorColor is required to work around a bug, which changes the cursor color to the color of the last drawn text. This has been fixed by a newer version of xterm, but not everybody is using it yet.] To get these right away, reload the .Xdefaults file to the X Option database Manager (you only need to do this when you just changed the .Xdefaults file): xrdb -merge ~/.Xdefaults *xterm-blink* *xterm-blinking-cursor* To make the cursor blink in an xterm, see tools/blink.c. Or use Thomas Dickey's xterm above patchlevel 107 (see above for where to get it), with these resources: XTerm*cursorBlink: on XTerm*cursorOnTime: 400 XTerm*cursorOffTime: 250 XTerm*cursorColor: White *hpterm-color* These settings work (more or less) for an hpterm, which only supports 8 foreground colors: :if has("terminfo") : set t_Co=8 : set t_Sf=<Esc>[&v%p1%dS : set t_Sb=<Esc>[&v7S :else : set t_Co=8 : set t_Sf=<Esc>[&v%dS : set t_Sb=<Esc>[&v7S :endif [<Esc> is a real escape, type CTRL-V <Esc>] *Eterm* *enlightened-terminal* These settings have been reported to work for the Enlightened terminal emulator, or Eterm. They might work for all xterm-like terminals that use the bold attribute to get bright colors. Add an ":if" like above when needed. :set t_Co=16 :set t_AF=^[[%?%p1%{8}%<%t3%p1%d%e%p1%{22}%+%d;1%;m :set t_AB=^[[%?%p1%{8}%<%t4%p1%d%e%p1%{32}%+%d;1%;m *TTpro-telnet* These settings should work for TTpro telnet. Tera Term Pro is a freeware / open-source program for MS-Windows. set t_Co=16 set t_AB=^[[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{32}%+5;%;%dm set t_AF=^[[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{22}%+1;%;%dm Also make sure TTpro's Setup / Window / Full Color is enabled, and make sure that Setup / Font / Enable Bold is NOT enabled. (info provided by John Love-Jensen<EMAIL_ADDRESS>top - main help file