# Un petit tutoriel pour gedit
## What is modelines ?
This can be done with the gedit plugin for modelines.
odelines are lines that you add to files for which you want certain settings.
When you open files with modelines in editors that support them the editors will behave according to the modelines.
So, you can think of modelines as per file settings of how for example indenting should work.
## With gedit ?
Here's how to do what you want in gedit:
1. Make sure the plugin is loaded (Edit - Settings - Plugins - Modelines).
2. Add modelines with the settings you want to your files.
3. Gedit should act according to the modelines now.
Gedit support Emacs, Kate and Vim style modelines.
Here's an example how you can do what you ask for with Emacs style modelines.
## Example 1 : Java
Edit your java files such that they contain the following first line:
```java
/* -*- mode: java; indent-tabs-mode: true; tab-width: 4 -*- */
class myfirstjavaprog
{
public static void main(String args[])
{
System.out.println("Hello World!");
}
}
```
This modeline will make the files containing it indent with tabs and and a width equal to 4 spaces.
## Example 2 : Python
For your python files you can use the following first line:
```python
##/* -*- mode: python; indent-tabs-mode: nil; tab-width: 4 -*- */
print "Hello, World!"
```
This modeline will make files containing it indent with 4 spaces.
## More ?
Obviously you could do something similar with Kate and Vim style modelines.
***
## Une question ?
> Pour toutes questions, remarques, corrections, vous pouvez me contacter par courriel
(lilian.besson[AT]ens-cachan.fr) ou via [ce formulaire](https://bitbucket.org/lbesson/web-sphinx/issues/new).