Describe your customized Vim editor for Python/Django development?

I've recently switched entirely to Vim for all my Python/Django development. It took me a lot of time to customize it to the point it is today, and God knows how hard it was for me to find help regarding the best vim plugins out there suited for Python/Django development.

I decided to ask this question so people like me could benefit directly from your experience: Вы создали идеальный редактор Python / Djangoish Vim? Опишите его нам (плагины, скрипты, индивидуальный .vimrc, цветовые схемы и т. Д.).

Спасибо

Моя конфигурация

Хорошо, это моя собственная конфигурация. на самом деле я решил создать простую конфигурацию Vim, чтобы я мог освоить небольшое количество плагинов, которые я выбрал для установки, вместо того, чтобы создавать большой стек плагинов, который я никогда не буду осваивать и использовать. Это список плагинов, которые я использую чаще всего:

  • NERDTree для управления файлами,
  • SnipMate , который является реализацией функции фрагментов TextMate,
  • Завершение кода обрабатывается с помощью Omnicompletion, который по умолчанию входит в Vim,
  • Pydoc для интеграции документации Python в Vim,
  • TagList для просмотра исходного кода, очень полезен в больших файлах. ИЗ ( `photo_data` ) LEFT JOIN `deleted_photos` ON` deleted_photos`.`photo_id` = `photo_data`.`photo_id` ...

    I have the following query that is being logged as a slow query:

    EXPLAIN EXTENDED SELECT *
    FROM (
    `photo_data`
    )
    LEFT JOIN `deleted_photos` ON `deleted_photos`.`photo_id` = `photo_data`.`photo_id`
    WHERE `deleted_photos`.`photo_id` IS NULL
    ORDER BY `upload_date` DESC
    LIMIT 50 
    

    Here's the output of explain:

    id  select_type  table  type  possible_keys  key  key_len  ref  rows  Extra
    1  SIMPLE  photo_data  index  NULL  upload_date  8  NULL  142523   
    1  SIMPLE  deleted_photos  eq_ref  photo_id  photo_id  767  tbc.photo_data.photo_id  1  Using where; Not exists
    

    I can see that it's having to go through all 142K records to pull the latest 50 out of the database.

    I have these two indexes:

    UNIQUE KEY `photo_id` (`photo_id`),
    KEY `upload_date` (`upload_date`)
    

    I was hoping hat the index key on upload_date would help limit the number rows. Anythoughts on what I can do to speed this up?

1
задан Mark Steudel 26 October 2010 в 21:06
поделиться