Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
d8538f06
Commit
d8538f06
authored
13 years ago
by
Diego Biurrun
Browse files
Options
Downloads
Patches
Plain Diff
doc: add editor configuration section with Vim and Emacs settings
based on a patch by Victor Vasiliev, vasilvv gmail com
parent
7efea2a0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/developer.texi
+25
-0
25 additions, 0 deletions
doc/developer.texi
with
25 additions
and
0 deletions
doc/developer.texi
+
25
−
0
View file @
d8538f06
...
@@ -207,6 +207,31 @@ Casts should be used only when necessary. Unneeded parentheses
...
@@ -207,6 +207,31 @@ Casts should be used only when necessary. Unneeded parentheses
should also be avoided if they don't make the code easier to understand.
should also be avoided if they don't make the code easier to understand.
@end itemize
@end itemize
@subsection Editor configuration
In order to configure Vim to follow Libav formatting conventions, paste
the following snippet into your @file
{
.vimrc
}
:
@example
" indentation rules for libav: 4 spaces, no tabs
set expandtab
set shiftwidth=4
set softtabstop=4
" allow tabs in Makefiles
autocmd FileType make set noexpandtab shiftwidth=8 softtabstop=8
" Trailing whitespace and tabs are forbidden, so highlight them.
highlight ForbiddenWhitespace ctermbg=red guibg=red
match ForbiddenWhitespace /
\s\+
$
\|\t
/
" Do not highlight spaces at the end of line while typing on that line.
autocmd InsertEnter
*
match ForbiddenWhitespace
/
\t\|\s\+\%
#
\@
@<
!
$
/
@end example
For Emacs, add these roughly equivalent lines to your @file
{
.emacs.d/init.el
}
:
@example
(setq c-default-style "k
&
r")
(setq-default c-basic-offset 4)
(setq-default indent-tabs-mode nil)
(setq-default show-trailing-whitespace t)
@end example
@section Development Policy
@section Development Policy
@enumerate
@enumerate
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment